Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remaining clippy lint definitions to Cargo.toml #10672

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions tools/ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.");
Expand Down
Loading