[Agents] Update agents to make sure do linting.#17366
Merged
AutomatedTester merged 4 commits intotrunkfrom Apr 21, 2026
Merged
Conversation
Agents have a bad habit of doing things which don't align with our formatting rules. This change updates the agents to make sure they follow the rules and as added extra run `./go format` as that will clean up.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the various agent instruction files to better align AI-generated changes with the repo’s formatter/linter expectations, primarily by standardizing on running ./go format after code edits.
Changes:
- Add “Formatting” guidance to language-specific
AGENTS.mdfiles (Rust/Ruby/Python/JS/Java/.NET). - Add repo-wide formatting guidance to the root
AGENTS.md, and update instructions to prefer./go format. - Update
CLAUDE.md,CLAUDE.local.md, and.github/copilot-instructions.mdto remind agents to run/suggest./go format.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
rust/AGENTS.md |
Adds Rust formatting guidance (rustfmt) and ./go format reminder. |
rb/AGENTS.md |
Adds Ruby formatting guidance (RuboCop) and ./go format reminder. |
py/AGENTS.md |
Adds Python formatting/lint guidance (ruff) and ./go format reminder. |
javascript/selenium-webdriver/AGENTS.md |
Adds JS formatting guidance (Prettier) and ./go format reminder. |
java/AGENTS.md |
Adds Java formatting guidance (google-java-format) and ./go format reminder. |
dotnet/AGENTS.md |
Adds .NET formatting guidance (dotnet format) and ./go format reminder. |
CLAUDE.md |
Adds a reminder to run/suggest ./go format after code changes. |
CLAUDE.local.md |
Same as CLAUDE.md, but for local agent instructions. |
AGENTS.md |
Adds a new repo-wide formatting section and updates pre-push guidance to ./go format. |
.github/copilot-instructions.md |
Adds a formatting reminder alongside “read AGENTS.md”. |
- ./go format invokes the Rake :format task directly, not scripts/format.sh - It auto-fixes in place but does NOT exit non-zero when files are modified; CI uses scripts/format.sh (via check-format.sh) for that behaviour - ./go format --lint does not exist; the correct command is ./go lint - Add instruction to check git diff after running ./go format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ./go format runs all-binding formatters (no change-detection), not per-changed-file; pass -<lang> flags to skip specific bindings - CI check: runs ./go format then git diff --quiet (not scripts/format.sh which is only used by Renovate CI jobs) - google-java-format organizes/sorts imports but does not remove unused imports or replace wildcards; correct the bullet point Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
🔗 Related Issues
💥 What does this PR do?
Agents have a bad habit of doing things which don't align with our formatting rules. This change updates the agents to make sure they follow the rules and as added extra run
./go formatas that will clean up.🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes