Skip to content

Commit 6980fcf

Browse files
zhuqi-lucasclaude
andauthored
docs: Add explicit fmt and clippy commands to AGENTS.md (#21171)
## Which issue does this PR close? N/A - minor documentation improvement. ## Rationale for this change The "Before Committing" section in `AGENTS.md` (symlinked as `CLAUDE.md`) tells agents to follow the contributor guide but does not list the concrete commands. Agents may skip `cargo fmt` or `cargo clippy` and submit PRs with formatting/lint errors that fail CI. ## What changes are included in this PR? Adds explicit `cargo fmt --all` and `cargo clippy` commands that agents MUST run before committing, along with a pointer to the full `./dev/rust_lint.sh` suite. ## Are these changes tested? Documentation only — no code changes. ## Are there any user-facing changes? No. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4e2e4e8 commit 6980fcf

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ Before committing any changes, you MUST follow the instructions in
1515
and ensure the required checks listed there pass. Do not commit code that
1616
fails any of those checks.
1717

18+
At a minimum, you MUST run and fix any errors from these commands before
19+
committing:
20+
21+
```bash
22+
# Format code
23+
cargo fmt --all
24+
25+
# Lint (must pass with no warnings)
26+
cargo clippy --all-targets --all-features -- -D warnings
27+
```
28+
29+
You can also run the full lint suite used by CI:
30+
31+
```bash
32+
./dev/rust_lint.sh
33+
# or auto-fix: ./dev/rust_lint.sh --write --allow-dirty
34+
```
35+
1836
When creating a PR, you MUST follow the [PR template](.github/pull_request_template.md).
1937

2038
## Testing

0 commit comments

Comments
 (0)