Skip to content

Commit 2c5f5fb

Browse files
dirvineclaude
andcommitted
fix: allow case_sensitive_file_extension lint in tests
Test code uses lowercased strings for extension comparison which is sufficient for test assertions. Allow the lint specifically in the test module. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f51b0fd commit 2c5f5fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/upgrade/monitor.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,11 @@ fn build_platform_patterns(arch: &str, os: &str) -> Vec<String> {
451451
}
452452

453453
#[cfg(test)]
454-
#[allow(clippy::unwrap_used, clippy::expect_used)]
454+
#[allow(
455+
clippy::unwrap_used,
456+
clippy::expect_used,
457+
clippy::case_sensitive_file_extension_comparisons
458+
)]
455459
mod tests {
456460
use super::*;
457461

@@ -592,8 +596,9 @@ mod tests {
592596
// Should not be a .sig file
593597
assert!(!asset.name.to_lowercase().ends_with(".sig"));
594598
// Should be an archive
599+
let lower = asset.name.to_lowercase();
595600
assert!(
596-
asset.name.ends_with(".tar.gz") || asset.name.ends_with(".zip"),
601+
lower.ends_with(".tar.gz") || lower.ends_with(".zip"),
597602
"Should be an archive format"
598603
);
599604
}

0 commit comments

Comments
 (0)