Repository navigation
docs: Add explicit fmt and clippy commands to AGENTS.md - #21171
Merged
Merged
Conversation
The existing "Before Committing" section references the contributor guide but does not list the concrete commands agents must run. Add explicit `cargo fmt` and `cargo clippy` commands so agents always run and fix formatting/lint errors before committing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates contributor/agent guidance to reduce CI failures by making the “Before Committing” lint/format expectations explicit in AGENTS.md (also symlinked as CLAUDE.md).
Changes:
- Add explicit
cargo fmt --allandcargo clippy ...commands agents must run before committing. - Add a pointer to the full
./dev/rust_lint.shlint suite (and its autofix mode).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Dandandan
approved these changes
Mar 26, 2026
Dandandan
reviewed
Mar 26, 2026
|
|
||
| ```bash | ||
| # Format code | ||
| cargo fmt --all |
Contributor
There was a problem hiding this comment.
Ah yeah I was suggesting this in #20970 (comment)
At least Claude will only read AGENTS.md at start so you have to put it there (for now).
Contributor
Author
|
Thanks @Dandandan for review, merged now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A - minor documentation improvement.
Rationale for this change
The "Before Committing" section in
AGENTS.md(symlinked asCLAUDE.md) tells agents to follow the contributor guide but does not list the concrete commands. Agents may skipcargo fmtorcargo clippyand submit PRs with formatting/lint errors that fail CI.What changes are included in this PR?
Adds explicit
cargo fmt --allandcargo clippycommands that agents MUST run before committing, along with a pointer to the full./dev/rust_lint.shsuite.Are these changes tested?
Documentation only — no code changes.
Are there any user-facing changes?
No.