Move remaining clippy lint definitions to Cargo.toml (#10672)

# Objective

Partially addresses #10612
After moving the initial docs_markdown warning, this is a PR that moves
the rest of the CI clippy lint definitions to the cargo.toml.

## Solution

- the `tools/ci/src/main.rs` clippy lints removed and just the warning
flag remains.
- the warnings moved to the root cargo workspace toml.
This commit is contained in:
Alex Okafor 2023-11-27 23:12:48 -05:00 committed by GitHub
parent 6d0c11a28f
commit 3c2cbb88bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View file

@ -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

View file

@ -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.");