Skip to content

Commit

Permalink
Configure clippy inside Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
jpikl committed Mar 29, 2024
1 parent 3b53ce7 commit f2142d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"editor.formatOnSave": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.extraArgs": [
"--",
"-W", "clippy::pedantic",
"-A", "clippy::module_name_repetitions",
"-A", "clippy::must_use_candidate",
],
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
"shellcheck.customArgs": [
"--external-sources",
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ codegen-units = 1
panic = "abort"
strip = true
lto = true

[lints.clippy]
all = "deny"
pedantic = "deny"
module_name_repetitions = "allow"
must_use_candidate = "allow"
6 changes: 1 addition & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ format *ARGS:

# Run clippy
clippy:
cargo clippy --workspace -- \
-D clippy::all \
-D clippy::pedantic \
-A clippy::module_name_repetitions \
-A clippy::must_use_candidate
cargo clippy --workspace

# Run tests
test:
Expand Down

0 comments on commit f2142d4

Please sign in to comment.