diff --git a/Cargo.toml b/Cargo.toml index d6717b9c51..5e0fd2c16c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,10 @@ members = [ type_complexity = "allow" doc_markdown = "warn" undocumented_unsafe_blocks = "warn" +redundant_else = "warn" +match_same_arms = "warn" +semicolon_if_nothing_returned = "warn" +map_flatten = "warn" [lints] workspace = true diff --git a/tools/ci/src/main.rs b/tools/ci/src/main.rs index 239cefd3f6..f5828a69c3 100644 --- a/tools/ci/src/main.rs +++ b/tools/ci/src/main.rs @@ -17,14 +17,6 @@ bitflags! { } } -const CLIPPY_FLAGS: [&str; 5] = [ - "-Wclippy::redundant_else", - "-Wclippy::match_same_arms", - "-Wclippy::semicolon_if_nothing_returned", - "-Wclippy::map_flatten", - "-Dwarnings", -]; - fn main() { // When run locally, results may differ from actual CI runs triggered by // .github/workflows/ci.yml @@ -79,7 +71,7 @@ fn main() { // - Type complexity must be ignored because we use huge templates for queries cmd!( sh, - "cargo clippy --workspace --all-targets --all-features -- {CLIPPY_FLAGS...}" + "cargo clippy --workspace --all-targets --all-features -- -Dwarnings" ) .run() .expect("Please fix clippy errors in output above.");