Skip to content

build: add rustfmt and clippy to toolchain components#1992

Closed
niStee wants to merge 1 commit intotopgrade-rs:mainfrom
niStee:build/add-toolchain-components
Closed

build: add rustfmt and clippy to toolchain components#1992
niStee wants to merge 1 commit intotopgrade-rs:mainfrom
niStee:build/add-toolchain-components

Conversation

@niStee
Copy link
Copy Markdown
Contributor

@niStee niStee commented Apr 28, 2026

What does this PR do

This PR adds rustfmt and clippy to the components list in rust-toolchain.toml.

Because CONTRIBUTING.md requires contributors to run cargo fmt and cargo clippy locally before submitting a PR, adding them to the toolchain configuration ensures that anyone working on the project will automatically have the correct tools installed via rustup. This improves developer experience without relying on auto-fixing CI or external dependencies.

Standards checklist

  • The PR title is descriptive
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself, with the relevant tools installed. If yes, add Topgrade's output of the relevant steps.
  • If this PR introduces new user-facing messages they are translated

AI involvement

I consulted an AI assistant to discuss the security implications of auto-fixing formatting in CI. After discovering that CI auto-fixes with PATs introduce security vulnerabilities for outside contributors, the AI suggested making this clean, local toolchain change instead.

@niStee niStee changed the title Add rustfmt and clippy to toolchain components build: add rustfmt and clippy to toolchain components Apr 28, 2026
@GideonBear
Copy link
Copy Markdown
Member

Can you show that this improves the developer experience? The default components to install include clippy and rustfmt, so any commands executed here will install all of them at the same time.

@niStee niStee closed this Apr 29, 2026
@niStee niStee deleted the build/add-toolchain-components branch April 29, 2026 18:51
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.

2 participants