Skip to content

docs: Add explicit fmt and clippy commands to AGENTS.md - #21171

Merged
zhuqi-lucas merged 1 commit into
apache:mainfrom
zhuqi-lucas:docs/claude-md-lint-checks
Mar 26, 2026
Merged

zhuqi-lucas merged 1 commit into
apache:mainfrom
zhuqi-lucas:docs/claude-md-lint-checks

Conversation

@zhuqi-lucas

Copy link
Copy Markdown
Contributor

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.

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>
Copilot AI review requested due to automatic review settings March 26, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --all and cargo clippy ... commands agents must run before committing.
  • Add a pointer to the full ./dev/rust_lint.sh lint suite (and its autofix mode).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Resolved
Comment thread AGENTS.md

```bash
# Format code
cargo fmt --all

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@zhuqi-lucas
zhuqi-lucas added this pull request to the merge queue Mar 26, 2026
@zhuqi-lucas

Copy link
Copy Markdown
Contributor Author

Thanks @Dandandan for review, merged now.

Merged via the queue into apache:main with commit 6980fcf Mar 26, 2026
11 checks passed
@zhuqi-lucas
zhuqi-lucas deleted the docs/claude-md-lint-checks branch March 26, 2026 09:44
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.

3 participants