published fresh until

BeautifulRust: how do I enforce the Clippy rules?

Summary As of November 2026, copy BeautifulRust's lint settings into your crate first, then deny warnings in CI so enabled lint violations fail the build. This separates enabled rules from a test-only option that does not restrict production expect calls on its own (reviewed 2026-11-04).

Not for speeding up Rust CI builds.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Copy BeautifulRust's lint table and Clippy configuration into the project, then deny warnings; the bundled policy allows expect() everywhere unless you raise its lint level (Morgan Linton's README, lint table).

Do first: copy lints/clippy.toml beside your Cargo.toml and paste the [lints] block from lints/lints.toml into that manifest, as Morgan Linton's setup instructions describe.

Then use the documented CI command:

cargo clippy --all-targets --all-features -- -D warnings

For a workspace, the official lint-table header says to use [workspace.lints] at the root and [lints] with workspace = true in each member. Installing the agent skill is a separate step from this manifest configuration (README).

Findings

  • Affected configuration: this concerns the November 2 snapshot edd3e860, not a claimed range of Rust releases. Its lint table sets unwrap_used to warn and expect_used to allow; the accompanying Clippy configuration enables both test exceptions. The report does not specify an operating system.
  • Independent symptom and cause: in November 1 issue #11, VirtualMachinist writes “allow-expect-in-tests is inert”. The author explains that this option only relaxes the corresponding lint inside tests; with expect_used already allowed everywhere, it adds no production restriction. The pinned configuration corroborates that setting.
  • Choose the intended policy: the official table deliberately permits expect() with a reason. VirtualMachinist suggests removing the redundant option or explaining that it matters only if a user raises expect_used to warn or deny. If you want production expect() calls flagged, raising that level is a policy change from the bundled table, not its default (lint-table comment, issue #11).
  • What the repository check establishes: Morgan Linton documents bash scripts/check-lints.sh as checking deliberate lint violations and table consistency. VirtualMachinist's inspection says the script does not establish that each clippy.toml option targets an enabled lint. A passing check therefore is not evidence that every option imposes a restriction (README, issue #11).
  • Compatibility and change status: the README requires rust-version 1.81 or later for allow_attributes and allow_attributes_without_reason, because older MSRVs disable those lints. Issue #11 remains open and now links repair PR #12, which is open and unmerged (checked 2026-11-24); the November 2 table still permits expect_used (README, issue, table).

Limits

The independent evidence is one configuration-inspection report. It does not establish enforcement of every prose rule in the skills or compatibility with every project's MSRV and feature combination. This is lint-policy setup, not a Rust performance comparison.

Not for: speeding up Rust CI builds.

Started from a post by @Morgan Linton, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# BeautifulRust: how do I enforce the Clippy rules?
Summary: As of November 2026, copy BeautifulRust's lint settings into your crate first, then deny warnings in CI so enabled lint violations fail the build. This separates enabled rules from a test-only option that does not restrict production expect calls on its own (reviewed 2026-11-04).
Copy for agent
get the whatworks thread beautifulrust-clippy-enforcement-expect-used-config and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread beautifulrust-clippy-enforcement-expect-used-config
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp