Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit efc8709

Browse files
Use Cargo's [workspace.lints.*] to config clippy
1 parent 25444cd commit efc8709

File tree

44 files changed

+133
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+133
-1
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xtask = "run --package xtask --bin xtask --"
33
tq = "test -- -q"
44
qt = "tq"
5-
lint = "clippy --all-targets -- -Aclippy::collapsible_if -Aclippy::needless_pass_by_value -Aclippy::nonminimal_bool -Aclippy::redundant_pattern_matching --cap-lints warn"
5+
lint = "clippy --all-targets -- --cap-lints warn"
66

77
[target.x86_64-pc-windows-msvc]
88
linker = "rust-lld"

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,9 @@ xshell = "0.2.5"
133133

134134
# We need to freeze the version of the crate, as the raw-api feature is considered unstable
135135
dashmap = { version = "=5.5.3", features = ["raw-api"] }
136+
137+
[workspace.lints.clippy]
138+
collapsible_if = "allow"
139+
needless_pass_by_value = "allow"
140+
nonminimal_bool = "allow"
141+
redundant_pattern_matching = "allow"

crates/base-db/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ stdx.workspace = true
2525
syntax.workspace = true
2626
vfs.workspace = true
2727
span.workspace = true
28+
29+
[lints]
30+
workspace = true

crates/cfg/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ derive_arbitrary = "1.3.2"
2929
# local deps
3030
mbe.workspace = true
3131
syntax.workspace = true
32+
33+
[lints]
34+
workspace = true

crates/flycheck/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ command-group.workspace = true
2424
paths.workspace = true
2525
stdx.workspace = true
2626
toolchain.workspace = true
27+
28+
[lints]
29+
workspace = true

crates/hir-def/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ test-fixture.workspace = true
5454

5555
[features]
5656
in-rust-tree = ["rustc-dependencies/in-rust-tree"]
57+
58+
[lints]
59+
workspace = true

crates/hir-expand/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ span.workspace = true
3636

3737
[dev-dependencies]
3838
expect-test = "1.4.0"
39+
40+
[lints]
41+
workspace = true

crates/hir-ty/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ test-fixture.workspace = true
5858

5959
[features]
6060
in-rust-tree = ["rustc-dependencies/in-rust-tree"]
61+
62+
[lints]
63+
workspace = true

crates/hir/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ tt.workspace = true
3333

3434
[features]
3535
in-rust-tree = []
36+
37+
[lints]
38+
workspace = true

crates/ide-assists/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ sourcegen.workspace = true
3636

3737
[features]
3838
in-rust-tree = []
39+
40+
[lints]
41+
workspace = true

0 commit comments

Comments
 (0)