Skip to content

ci: Drop the stale clippy::too_many_lines allow in the parity test (#962) - #2639

Merged
zackees merged 1 commit into
masterfrom
ci/962-rust-018-parity-tmm-allow
Oct 27, 2026
Merged

zackees merged 1 commit into
masterfrom
ci/962-rust-018-parity-tmm-allow

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Refs #962 (ci-lint burn-down, RUST-018).

rust/obs-properties/tests/properties/parity.rs carried a file-level
#![allow(clippy::missing_safety_doc, clippy::too_many_lines, clippy::new_without_default)].
The only banned complexity lint in it is clippy::too_many_lines, and that
suppression is dead: too_many_lines is not enabled anywhere in the tree.

RED

ci-lint precheck on origin/master (pin a1917ce7…) reports it as the one unexcepted RUST-018 finding:

[RUST-018] VIOLATION rust/obs-properties/tests/properties/parity.rs:14
    what:  `#![allow( clippy::missing_safety_doc, clippy::too_many_lines, clippy::new_without_default )]` silences `clippy::too_many_lines` for good, so the function never has to shrink
ci-lint precheck: 17 violation(s), 557 approved exception(s), 11 needs_review

GREEN

Commit 0026d065f: the allow no longer names clippy::too_many_lines — the two lints that do fire stay allowed.

#![allow(clippy::missing_safety_doc, clippy::new_without_default)]
ci-lint precheck: 16 violation(s), 557 approved exception(s), 11 needs_review   (17 -> 16; RUST-018 VIOLATION gone, no new finding)

Why delete the lint, not switch to expect

RUST-018's generic fix note says "replace allow with expect". That is
unsafe here: an expect that never fires is itself an error
(unfulfilled_lint_expectations), and too_many_lines never fires in this
tree —

  • [workspace.lints.clippy] sets only wildcard_imports / enum_glob_use
    (the two RUST-018 Cargo.toml findings are approved exceptions);
  • there is no root clippy.toml;
  • the lint lane runs clippy … -- -D warnings with no clippy::pedantic
    enablement (and too_many_lines is a pedantic, allow-by-default lint).

So the correct burn-down is to drop the stale lint from the allow, not to add
an expectation that would fail the build.

Verification

  • soldr cargo clippy -p obs-properties --all-targets --locked -- -D warnings — Finished, exit 0 (this compiles the properties test target the allow lives in, so the removal is proven safe, not just rule-clean).
  • soldr cargo fmt -p obs-properties -- --check — clean.

No docs/features.md line: no user-visible change (a lint-suppression cleanup).

)

The file-level `#![allow(...)]` in the obs-properties parity test named
`clippy::too_many_lines`, but that lint is not enabled anywhere in the tree:
`[workspace.lints.clippy]` sets only `wildcard_imports` and `enum_glob_use`,
there is no root `clippy.toml`, and the lint lane runs `clippy ... -- -D
warnings` without `clippy::pedantic`. The suppression never fired, so an
`expect` (the rule's generic note) would be unfulfilled and fail the build;
drop the stale lint instead and keep the two that do fire
(`missing_safety_doc`, `new_without_default`).

Clears the one unexcepted `[RUST-018] VIOLATION` the ci-lint pin reports.
@zackees
zackees enabled auto-merge October 27, 2026 13:39
@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • RED (origin/master): ci-lint precheck reports [RUST-018] VIOLATION rust/obs-properties/tests/properties/parity.rs:14 — the file-level allow names clippy::too_many_lines; 17 violation(s).
  • GREEN 0026d065f: the allow drops clippy::too_many_lines and keeps the two that fire; 17 -> 16 violation(s), 0 new.
  • Local proof the removal is safe: soldr cargo clippy -p obs-properties --all-targets --locked -- -D warnings → Finished, exit 0; soldr cargo fmt -p obs-properties -- --check clean.
  • Branch ci/962-rust-018-parity-tmm-allow is based on origin/master; auto-merge enabled.

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review (author account, so comment rather than approval).

Verdict: correct, nothing to change. The removed item was the only banned complexity lint in that allow; clippy::missing_safety_doc and clippy::new_without_default stay, and the attribute collapses to one line. git grep too_many_lines over the tree (excluding docs/ci-evidence) finds no clippy configuration enabling it, so dropping the suppression cannot trip a lint — it also means the suppression was dead, which is exactly the RUST-018 shape.

Verified on 0026d065f: ci-lint precheck gives 16 violations / 557 approved exceptions (master's 17 with the [RUST-018] rust/obs-properties/tests/properties/parity.rs:14 finding), i.e. one burnt down with no new one. docs/features.md: correctly untouched (test tooling only).

@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit c4edc1d Oct 27, 2026
32 checks passed
@zackees
zackees deleted the ci/962-rust-018-parity-tmm-allow branch October 27, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant