Skip to content

style: enforce clippy::useless_format - #264

Draft
danieleades wants to merge 6 commits into
httpmock:masterfrom
danieleades:agent/clippy-useless-format
Draft

style: enforce clippy::useless_format#264
danieleades wants to merge 6 commits into
httpmock:masterfrom
danieleades:agent/clippy-useless-format

Conversation

@danieleades

@danieleades danieleades commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Removes useless_format from the Clippy allow-list and passes the fallback certificate error message directly to expect. This tightens linting without changing runtime behavior.

Depends on #238.

Checks: cargo fmt --all -- --check; cargo +stable clippy --all-targets --all-features.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@danieleades
danieleades force-pushed the agent/clippy-useless-format branch 2 times, most recently from 7f1438c to 84adc71 Compare August 9, 2026 09:18
Add a [lints.clippy] table that denies clippy::all so new lint violations
fail CI. The lints that already fired when clippy was re-enabled are
allow-listed as tracked backlog, to be removed one class per stacked PR.

This PR also clears the first class: rewrite the 46 bool_assert_comparison
violations (assert_eq!(expr, true/false) -> assert!(expr) / assert!(!(expr)))
across the comparison matcher tests and one util test, so that lint is
enforced rather than allowed.
The test, coverage, and feature-combination jobs inherit the default
`-D warnings` from setup-rust-toolchain, so rustc warnings that surfaced
when `#![allow(warnings)]` was removed failed CI as hard errors.

Add a [lints.rust] table mirroring [lints.clippy]: gate the `warnings`
group at deny so regressions fail CI, and allow-list the existing
backlog (dead_code, unused_*, private_bounds, mismatched_lifetime_syntaxes)
to be burned down one class per stacked PR. Denying via the manifest keeps
local dev and CI consistent.
mismatched_lifetime_syntaxes does not exist on the 1.88.0 MSRV toolchain,
and the newly-denied `warnings` group escalates the resulting unknown_lints
warning to an error. Allow unknown_lints so lint names that only exist on
newer toolchains are silently ignored on older ones.
@danieleades
danieleades force-pushed the agent/clippy-useless-format branch from 84adc71 to 9c1d492 Compare August 9, 2026 14:11
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