Skip to content

Commit 2d6ce56

Browse files
authored
Fix all cargo shear warnings (#24268)
1 parent 716260b commit 2d6ce56

30 files changed

Lines changed: 98 additions & 19 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ jobs:
732732
persist-credentials: false
733733
- uses: cargo-bins/cargo-binstall@1800853f2578f8c34492ec76154caef8e163fbca # v1.17.7
734734
- run: cargo binstall --no-confirm cargo-shear
735-
- run: cargo shear
735+
- run: cargo shear --deny-warnings
736736

737737
ty-completion-evaluation:
738738
name: "ty completion evaluation"

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ zip = { version = "0.6.6", default-features = false }
216216
[workspace.metadata.cargo-shear]
217217
ignored = [
218218
"getrandom",
219-
"ruff_options_metadata",
220-
"uuid",
221-
"get-size2",
222219
"ty_completion_bench",
223220
"ty_completion_eval",
224221
]

crates/ruff/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,6 @@ test-case = { workspace = true }
9393

9494
[lints]
9595
workspace = true
96+
97+
[lib]
98+
doctest = false

crates/ruff_annotate_snippets/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ documentation = { workspace = true }
1010
repository = { workspace = true }
1111
license = "MIT OR Apache-2.0"
1212

13-
[lib]
14-
1513
[dependencies]
1614
anstyle = { workspace = true }
1715
memchr = { workspace = true }
@@ -36,3 +34,6 @@ harness = false
3634

3735
[lints]
3836
workspace = true
37+
38+
[lib]
39+
test = false

crates/ruff_benchmark/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,17 @@ required-features = ["ty_walltime"]
9393

9494
[lints]
9595
workspace = true
96+
97+
[package.metadata.cargo-shear]
98+
# We use optional dependencies even for dev dependencies for faster CI compile times.
99+
# This is fine because this crate is "dev-only".
100+
ignored = [
101+
"divan",
102+
"ruff_linter",
103+
"ruff_python_formatter",
104+
"ruff_python_parser",
105+
"ruff_python_trivia",
106+
"ty-project",
107+
"mimalloc",
108+
"tikv-jemallocator"
109+
]

crates/ruff_cache/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ ruff_macros = { workspace = true }
2323

2424
[lints]
2525
workspace = true
26+
27+
[lib]
28+
test = false

crates/ruff_diagnostics/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ license = { workspace = true }
1212

1313
[lib]
1414
doctest = false
15+
test = false
1516

1617
[dependencies]
1718
ruff_text_size = { workspace = true, features = ["get-size"] }

crates/ruff_graph/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ zip = { workspace = true, features = [] }
3333

3434
[lints]
3535
workspace = true
36+
37+
[lib]
38+
test = false
39+
doctest = false

crates/ruff_macros/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ license = { workspace = true }
1313
[lib]
1414
proc-macro = true
1515
doctest = false
16+
test = false
1617

1718
[dependencies]
1819
ruff_python_trivia = { workspace = true }

crates/ruff_markdown/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ insta = { workspace = true }
2626

2727
[lints]
2828
workspace = true
29+
30+
[lib]
31+
doctest = false

0 commit comments

Comments
 (0)