fix: perbaiki 5 warning clippy pre-existing (base untuk TUI overhaul)

unnested_or_patterns, collapsible_if, items_after_statements, dan
case_sensitive_file_extension_comparisons di auto.rs, engine.rs, dan
actions/mod.rs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
asepharyana
2026-07-14 23:41:53 +07:00
co-authored by Claude Sonnet 5
parent 7a9cb7bf34
commit 6b58977875
3 changed files with 12 additions and 8 deletions
+7 -3
View File
@@ -109,17 +109,21 @@ fn is_production_code(path: &str) -> bool {
matches!(
c,
std::path::Component::Normal(seg)
if matches!(seg.to_str(), Some("test") | Some("tests") | Some("__tests__"))
if matches!(seg.to_str(), Some("test" | "tests" | "__tests__"))
)
});
let file_stem = path_obj.file_stem().and_then(|s| s.to_str()).unwrap_or("");
let is_test_filename = file_stem.starts_with("test_")
|| file_stem.ends_with("_test")
|| file_stem.ends_with(".test")
|| std::path::Path::new(file_stem)
.extension()
.is_some_and(|ext| ext.eq_ignore_ascii_case("test"))
|| file_stem == "spec"
|| file_stem.ends_with("_spec")
|| file_stem.ends_with(".spec");
|| std::path::Path::new(file_stem)
.extension()
.is_some_and(|ext| ext.eq_ignore_ascii_case("spec"));
if in_test_dir || is_test_filename {
return false;