mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 06:00:20 +00:00
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:
parent
6d0c11a28f
commit
3c2cbb88bc
2 changed files with 5 additions and 9 deletions
|
@ -33,6 +33,10 @@ members = [
|
||||||
type_complexity = "allow"
|
type_complexity = "allow"
|
||||||
doc_markdown = "warn"
|
doc_markdown = "warn"
|
||||||
undocumented_unsafe_blocks = "warn"
|
undocumented_unsafe_blocks = "warn"
|
||||||
|
redundant_else = "warn"
|
||||||
|
match_same_arms = "warn"
|
||||||
|
semicolon_if_nothing_returned = "warn"
|
||||||
|
map_flatten = "warn"
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
@ -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() {
|
fn main() {
|
||||||
// When run locally, results may differ from actual CI runs triggered by
|
// When run locally, results may differ from actual CI runs triggered by
|
||||||
// .github/workflows/ci.yml
|
// .github/workflows/ci.yml
|
||||||
|
@ -79,7 +71,7 @@ fn main() {
|
||||||
// - Type complexity must be ignored because we use huge templates for queries
|
// - Type complexity must be ignored because we use huge templates for queries
|
||||||
cmd!(
|
cmd!(
|
||||||
sh,
|
sh,
|
||||||
"cargo clippy --workspace --all-targets --all-features -- {CLIPPY_FLAGS...}"
|
"cargo clippy --workspace --all-targets --all-features -- -Dwarnings"
|
||||||
)
|
)
|
||||||
.run()
|
.run()
|
||||||
.expect("Please fix clippy errors in output above.");
|
.expect("Please fix clippy errors in output above.");
|
||||||
|
|
Loading…
Reference in a new issue