Skip to content

Commit

Permalink
Allow the case_sensitive_file_extension_comparisons lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Dec 7, 2023
1 parent cfba852 commit 2983ff0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/infra/cli/src/toolchains/napi/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ impl NapiCli {
for child in output_dir.collect_children()? {
let file_name = child.unwrap_name();

// NAPI emits files with lowercase names.
#[allow(clippy::case_sensitive_file_extension_comparisons)]
match file_name {
"index.js" | "index.d.ts" => {
source_files.push(output_dir.join(file_name));
}
file if Path::new(file)
.extension()
.is_some_and(|ext| ext.eq_ignore_ascii_case("node"))
&& node_binary.is_none() =>
{
file if file.ends_with(".node") && node_binary.is_none() => {
node_binary = Some(output_dir.join(file));
}
_ => {
Expand Down

0 comments on commit 2983ff0

Please sign in to comment.