Add pre-PR requirements to run cargo fmt and clippy in agent instructions#120
Merged
Add pre-PR requirements to run cargo fmt and clippy in agent instructions#120
Conversation
Copilot
AI
changed the title
[WIP] Run Rust fmt and Clippy fixes before PR
Verify rust fmt and clippy workflow implementation
Dec 11, 2025
Owner
|
@copilot but i want the agent to do this before actually opening the pr. Can'ty you set it up as instructions file for the agent? |
…ons.md Co-authored-by: becheran <22472855+becheran@users.noreply.github.com>
Contributor
Author
Added a "Pre-Pull Request Requirements" section to |
Copilot
AI
changed the title
Verify rust fmt and clippy workflow implementation
Add pre-PR requirements to run cargo fmt and clippy in agent instructions
Dec 11, 2025
becheran
approved these changes
Dec 11, 2025
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.
Adds explicit instructions for the Copilot agent to run rust fmt and clippy fixes before opening a pull request.
Changes Made
Added a new "Pre-Pull Request Requirements" section to
.github/instructions/rust.instructions.mdthat instructs the agent to:cargo fmtcargo clippy --fix --all-targets --all-features --allow-dirty --allow-stagedcargo clippy --all-targets --all-features -- -D warningsThese instructions ensure code quality and consistency are enforced by the agent before a PR is opened for review, rather than relying on CI to fix issues after the PR is created.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.