Skip to content

Commit fc03ff8

Browse files
committed
Merge #149: Clippy: Doesn't block CI runs on warnings
Approved-by: ReinierMaas Priority: Normal Auto-deploy: false
2 parents 84a226c + 9e54992 commit fc03ff8

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

‎Cargo.toml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ members = [
1212
version = "0.36.0"
1313

1414
[workspace.lints.clippy]
15-
cargo = { level = "warn", priority = -1 }
15+
cargo = { level = "deny", priority = -1 }
1616
cargo_common_metadata = "allow"
1717

18-
complexity = { level = "warn", priority = -1 }
18+
complexity = { level = "deny", priority = -1 }
1919
correctness = { level = "deny", priority = -1 }
2020
# nursery, new untested lints
2121
nursery = { level = "allow", priority = -1 }
2222

23-
pedantic = { level = "warn", priority = -1 }
24-
perf = { level = "warn", priority = -1 }
23+
pedantic = { level = "deny", priority = -1 }
24+
perf = { level = "deny", priority = -1 }
2525
# restriction, lints that can enforce a coherent code style
2626
restriction = { level = "allow", priority = -1 }
27-
style = { level = "warn", priority = -1 }
28-
suspicious = { level = "warn", priority = -1 }
27+
style = { level = "deny", priority = -1 }
28+
suspicious = { level = "deny", priority = -1 }
2929

3030
# Prevent duplicate versions of crates from being used in the workspace. If an easy fix is not
3131
# possible, you can add the crate to the `allowed-duplicate-crates` list in `clippy.toml`.

‎clippy.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ allowed-duplicate-crates = [
1212
"sha2",
1313
"syn",
1414
"thiserror",
15+
"tokio-tungstenite",
1516
"tower-http",
17+
"tungstenite",
1618
"windows-sys",
1719
]

‎justfile‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,19 @@ lint-light *ARGS:
8383
[group('lint')]
8484
lint-heavy: clippy mypy
8585

86+
# Rust static analysis
87+
[group('lint')]
88+
clippy-fix:
89+
# `cargo clippy --fix` caps lints to warnings internally; keep its artifacts separate.
90+
CARGO_TARGET_DIR=target/clippy-fix cargo clippy --no-deps --all-targets --fix --allow-dirty --allow-staged -- -Dwarnings
91+
CARGO_TARGET_DIR=target/clippy-fix cargo clippy --no-deps --all-targets --no-default-features --fix --allow-dirty --allow-staged -- -Dwarnings
92+
CARGO_TARGET_DIR=target/clippy-fix cargo clippy --no-deps --all-targets --all-features --fix --allow-dirty --allow-staged -- -Dwarnings
93+
8694
# Rust static analysis
8795
[group('lint')]
8896
clippy:
89-
cargo clippy --no-deps --all-targets --fix --allow-dirty --allow-staged -- -Dwarnings
9097
cargo clippy --no-deps --all-targets -- -Dwarnings
91-
cargo clippy --no-deps --all-targets --no-default-features --fix --allow-dirty --allow-staged -- -Dwarnings
9298
cargo clippy --no-deps --all-targets --no-default-features -- -Dwarnings
93-
cargo clippy --no-deps --all-targets --all-features --fix --allow-dirty --allow-staged -- -Dwarnings
9499
cargo clippy --no-deps --all-targets --all-features -- -Dwarnings
95100

96101
# Python static analysis type-checker

0 commit comments

Comments
 (0)