clippy: move unexpected_cfgs to workspace lints

and use workspace lints in seq
This commit is contained in:
Daniel Hofstetter 2025-10-09 16:17:05 +02:00
parent f6073fd906
commit 5b5eed4bbd
2 changed files with 8 additions and 12 deletions

View file

@ -1,7 +1,7 @@
# coreutils (uutils)
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
# spell-checker:ignore (libs) bigdecimal datetime serde bincode gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind
# spell-checker:ignore (libs) bigdecimal datetime serde bincode gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs
[package]
name = "coreutils"
@ -638,6 +638,9 @@ pedantic = { level = "deny", priority = -1 }
# 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]
# Allow "fuzzing" as a "cfg" condition name
# https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
#unused_qualifications = "warn" // TODO: fix warnings in uucore, then re-enable this lint
[workspace.lints.clippy]

View file

@ -1,4 +1,4 @@
# spell-checker:ignore bigdecimal cfgs extendedbigdecimal
# spell-checker:ignore bigdecimal extendedbigdecimal
[package]
name = "uu_seq"
description = "seq ~ (uutils) display a sequence of numbers"
@ -12,6 +12,9 @@ categories.workspace = true
edition.workspace = true
readme.workspace = true
[lints]
workspace = true
[lib]
path = "src/seq.rs"
@ -33,13 +36,3 @@ fluent = { workspace = true }
[[bin]]
name = "seq"
path = "src/main.rs"
# FIXME: this is the only crate that has a separate lints configuration,
# which for now means a full copy of all clippy and rust lints here.
[lints.clippy]
all = { level = "deny", priority = -1 }
# Allow "fuzzing" as a "cfg" condition name
# https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }