Consolidate lint management with workspaces

At the moment, most crates rely on build scripts and other methods to keep lint-consistency. As of recent, Rust can use workspaces to globally set all the lint configurations.

This PR only adds lint configuration to each crate, but it does not introduce any changes to the code or lint configuration. In the subsequent PRs, I plan to gradually move lints from `uucore` to workspace, making all code consistent.

Note that `seq` relies on a custom lint config - which means its configuration may need to be managed by hand until Cargo introduces per-crate overrides.
This commit is contained in:
Yuri Astrakhan
2025-04-09 03:58:46 -04:00
parent bb3b418052
commit 2413dc9168
103 changed files with 318 additions and 0 deletions
+10
View File
@@ -584,3 +584,13 @@ manual_let_else = "warn"
all = { level = "deny", priority = -1 }
cargo = { level = "warn", priority = -1 }
pedantic = { level = "deny", priority = -1 }
# This is the linting configuration for all crates.
# Eventually the clippy settings from the `[lints]` section should be moved here.
# In order to use these, all crates have `[lints] workspace = true` section.
[workspace.lints.rust]
# unused_qualifications = "warn"
[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
#cargo = { level = "warn", priority = -1 }
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/arch.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/base32.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/base64.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/basename.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/basenc.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/cat.rs"
+3
View File
@@ -12,6 +12,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/chcon.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/chgrp.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/chmod.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/chown.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/chroot.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/cksum.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/comm.rs"
+3
View File
@@ -17,6 +17,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/cp.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/csplit.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/cut.rs"
+3
View File
@@ -14,6 +14,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/date.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/dd.rs"
+3
View File
@@ -13,6 +13,9 @@ edition = "2024"
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/df.rs"

Some files were not shown because too many files have changed in this diff Show More