Skip to content

chore: fix clippy lints failing CI on latest nightly - #69

Merged
apbendi merged 2 commits into
mainfrom
clippy-redundant-else
Jul 25, 2026
Merged

chore: fix clippy lints failing CI on latest nightly#69
apbendi merged 2 commits into
mainfrom
clippy-redundant-else

Conversation

@apbendi

@apbendi apbendi commented Jul 25, 2026

Copy link
Copy Markdown
Member

The clippy CI job (dtolnay/rust-toolchain@clippy + RUSTFLAGS: -Dwarnings) floats on the latest nightly clippy, and newer lint versions now flag existing code on main, so every PR currently fails the clippy job regardless of its own changes (see #64, #67). This fixes all of them:

  • redundant_else in src/fmt/mod.rs — else block after process::exit(1)
  • useless_borrows_in_formatting (4x) in src/check/validators/variable_names.rs — redundant & in format! args
  • collapsible_match in src/check/validators/src_names_internal.rsif folded into a match guard

The variable_names and src_names_internal fixes intentionally mirror the identical changes already on the transient branch (#64) so that branch rebases cleanly once this merges.

Verified with RUSTFLAGS=-Dwarnings cargo +nightly clippy --workspace --all-targets --all-features (nightly 2026-07-24) and the full test suite.

Worth considering separately: pinning the clippy toolchain in ci.yml so new nightly lints land when we choose, not on whatever PR happens to push next.

apbendi added 2 commits July 25, 2026 11:11
The clippy CI job installs the latest nightly clippy on every run, and
newer lint versions now flag existing code on main: a redundant else
after process::exit, redundant borrows in format! args, and an if that
can be collapsed into a match guard.

The variable_names and src_names_internal fixes mirror the identical
changes already made on the transient branch (PR #64) so it rebases
cleanly.
Main's lockfile pinned rustix 0.36.8, which uses rustc_* attributes the
current nightly compiler rejects, breaking the build/test/lint CI jobs.
Lockfile taken verbatim from the transient branch (PR #64), which
already contains these bumps.
@apbendi
apbendi merged commit f128e53 into main Jul 25, 2026
4 checks passed
@apbendi
apbendi deleted the clippy-redundant-else branch July 25, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant