fix(rust): resolve all clippy warnings treated as errors in CI
Fix 18 clippy errors across 7 files: - lib.rs: change doc comment to regular comment (empty line after doc) - arch_audit.rs: replace format!() with string literal, use is_none_or - code_quality.rs: collapsible if, map_or → is_none_or - commit.rs: collapsible match guard - explore.rs: needless_range_loop → iterator enumerate - skills.rs: map_or(false,...) → is_some_and - semantic_search.rs: map_or → is_none_or, sort_by → sort_by_key, remove explicit type to avoid type_complexity CI was failing with 'error: could not compile zesdex-infrastructure due to 18 previous errors' at clippy step.
This commit is contained in:
@@ -108,13 +108,11 @@ pub fn validate_commit_message(msg: &str) -> Result<(), Vec<String>> {
|
||||
// Type-specific rules.
|
||||
match type_ {
|
||||
"chore" | "docs" | "refactor" | "test" | "style" | "perf" | "ci" | "build"
|
||||
| "revert" => {
|
||||
if scope.is_some() {
|
||||
errors.push(format!(
|
||||
"'{type_}' commits should not use a scope. \
|
||||
Only 'feat' and 'fix' require scopes."
|
||||
));
|
||||
}
|
||||
| "revert" if scope.is_some() => {
|
||||
errors.push(format!(
|
||||
"'{type_}' commits should not use a scope. \
|
||||
Only 'feat' and 'fix' require scopes."
|
||||
));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user