config: drop settings that restate a tool default #264

Merged
natsukium merged 4 commits from chore/trim-default-config into main 2026-09-12 17:55:07 +09:00
Owner

A sweep over the repository's tool configuration for settings that say
nothing: values identical to the tool's own default, a duplicated MSRV,
advisory ignores whose advisories are gone, and lint allows the lint
policy already grants. Each removal was verified against the tool rather
than against documentation.

What goes

Dead advisory ignores. wayland-scanner no longer pins quick-xml
^0.39, so RUSTSEC-2026-0194 and -0195 never reach the graph; cargo-deny
was emitting an advisory-not-detected warning for each.

The duplicated MSRV. Clippy reads [workspace.package] rust-version
by itself, and prefers clippy.toml's msrv silently when the two
differ — so the duplicate was a second place to edit that could outvote
the manifest.

Settings equal to the tool's default: rustfmt's max_width and
tab_spaces; cargo-deny's db-urls, confidence-threshold,
[licenses] version and [bans] multiple-versions; buf's STANDARD
lint category. Removing all of them leaves cargo deny check output
byte-identical and treefmt a no-op. rustfmt's edition is redundant
too (treefmt passes --edition 2024 on the command line, which wins)
but is kept so a bare rustfmt <file> does not fall back to 2015 rules.
newline_style = "Unix" stays: it is the only real deviation there, and
the Windows checkout depends on it.

104 module-level #![allow(clippy::unwrap_used / expect_used)].
clippy.toml already exempts every item in a bare #[cfg(test)]
module — helper functions included, not just #[test] ones.

What deliberately stays

Clippy keys on the bare cfg(test), so the eight allows under
#[cfg(all(test, unix))] and #[cfg(all(test, feature = "schema"))]
modules are load-bearing, as are those in benches/** (never a test
context) and in tests/*.rs, where the helpers around the #[test]
functions are not exempt. Where an allow also named float_cmp or
cast_possible_wrap, only the in-test lints were dropped.

Verification

just check in full — fmt-check, lint, check-portable,
prose-check, skill-check, test (3489 passed), deny,
proto-compat-test, proto-compat, release-check-test — plus
nix flake check, which rebuilds the MSRV derivation.

A sweep over the repository's tool configuration for settings that say nothing: values identical to the tool's own default, a duplicated MSRV, advisory ignores whose advisories are gone, and lint allows the lint policy already grants. Each removal was verified against the tool rather than against documentation. ## What goes **Dead advisory ignores.** wayland-scanner no longer pins quick-xml ^0.39, so RUSTSEC-2026-0194 and -0195 never reach the graph; cargo-deny was emitting an `advisory-not-detected` warning for each. **The duplicated MSRV.** Clippy reads `[workspace.package] rust-version` by itself, and prefers `clippy.toml`'s `msrv` silently when the two differ — so the duplicate was a second place to edit that could outvote the manifest. **Settings equal to the tool's default:** rustfmt's `max_width` and `tab_spaces`; cargo-deny's `db-urls`, `confidence-threshold`, `[licenses] version` and `[bans] multiple-versions`; buf's `STANDARD` lint category. Removing all of them leaves `cargo deny check` output byte-identical and `treefmt` a no-op. rustfmt's `edition` is redundant too (treefmt passes `--edition 2024` on the command line, which wins) but is kept so a bare `rustfmt <file>` does not fall back to 2015 rules. `newline_style = "Unix"` stays: it is the only real deviation there, and the Windows checkout depends on it. **104 module-level `#![allow(clippy::unwrap_used / expect_used)]`.** `clippy.toml` already exempts every item in a bare `#[cfg(test)]` module — helper functions included, not just `#[test]` ones. ## What deliberately stays Clippy keys on the *bare* `cfg(test)`, so the eight allows under `#[cfg(all(test, unix))]` and `#[cfg(all(test, feature = "schema"))]` modules are load-bearing, as are those in `benches/**` (never a test context) and in `tests/*.rs`, where the helpers around the `#[test]` functions are not exempt. Where an allow also named `float_cmp` or `cast_possible_wrap`, only the in-test lints were dropped. ## Verification `just check` in full — `fmt-check`, `lint`, `check-portable`, `prose-check`, `skill-check`, `test` (3489 passed), `deny`, `proto-compat-test`, `proto-compat`, `release-check-test` — plus `nix flake check`, which rebuilds the MSRV derivation.
wayland-scanner has moved off the quick-xml ^0.39 pin, so neither
RUSTSEC-2026-0194 nor -0195 reaches the graph any more. cargo-deny
reports an `advisory-not-detected` warning for each stale entry, which
under `-D warnings` would be a gate failure waiting to happen and in the
meantime trains readers to ignore the tool's output.

Assisted-by: Claude Code:Opus 5
Clippy reads `[workspace.package] rust-version` on its own, so the
duplicate `msrv` key only created a second place to edit. When the two
drift clippy silently prefers clippy.toml, so a bumped manifest would
keep being linted against the old floor.

Assisted-by: Claude Code:Opus 5
rustfmt's max_width/tab_spaces, cargo-deny's advisory db URL, license
confidence threshold, `[licenses] version` and `[bans]
multiple-versions`, and buf's STANDARD lint category all restated the
tool's own default. Spelling a default out gives a reader no way to tell
a deliberate policy from an inherited one, and it silently pins the value
if the tool ever revises its default.

rustfmt's `edition` is redundant too — treefmt passes `--edition 2024` on
the command line, which wins over the file — but it is kept so a bare
`rustfmt <file>` does not fall back to 2015 rules.

Assisted-by: Claude Code:Opus 5
lints: stop re-granting in-test allows clippy.toml already grants
All checks were successful
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Successful in 2m14s
darwin / detect relevant changes (pull_request) Successful in 5s
darwin / darwin docs-only no-op (pull_request) Has been skipped
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m10s
pr / nix flake check (pull_request) Successful in 6s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m47s
pr / wire schema is compatible with the base (pull_request) Successful in 12s
windows / cargo nextest (Windows) (pull_request) Successful in 3m55s
darwin / build felis (aarch64-darwin) (pull_request) Successful in 52s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 53s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 4s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
windows / frontend smoke (Windows) (pull_request) Successful in 2m24s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
b33f24b08d
`allow-unwrap-in-tests` / `allow-expect-in-tests` / `allow-print-in-tests`
exempt every item in a bare `#[cfg(test)]` module, helper functions
included, so the module-level `#![allow]` in each of them said nothing.
Dropping them leaves an `#![allow]` inside a test module meaning what it
should: this module needs something the test policy does not already
cover.

The allows under `#[cfg(all(test, …))]` modules stay: clippy keys on the
bare `cfg(test)`, so a compound gate is not a test context to it. So do
the ones in `benches/**` (never test context) and in `tests/*.rs`, where
only `#[test]` functions are exempt and the helpers around them are not.

Assisted-by: Claude Code:Opus 5
natsukium deleted branch chore/trim-default-config 2026-09-12 17:55:08 +09:00
Sign in to join this conversation.
No description provided.