Skip to content

Add pre-PR requirements to run cargo fmt and clippy in agent instructions#120

Merged
becheran merged 3 commits intomasterfrom
copilot/run-rust-fmt-and-clippy-fixes
Dec 11, 2025
Merged

Add pre-PR requirements to run cargo fmt and clippy in agent instructions#120
becheran merged 3 commits intomasterfrom
copilot/run-rust-fmt-and-clippy-fixes

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

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.md that instructs the agent to:

  1. Format code with rustfmt: Run cargo fmt
  2. Apply clippy fixes: Run cargo clippy --fix --all-targets --all-features --allow-dirty --allow-staged
  3. Verify no warnings remain: Run cargo clippy --all-targets --all-features -- -D warnings

These 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

The agent shouuld run rust fmt and clippy fixes before opening a pull request


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Run Rust fmt and Clippy fixes before PR Verify rust fmt and clippy workflow implementation Dec 11, 2025
Copilot AI requested a review from becheran December 11, 2025 20:16
@becheran
Copy link
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>
Copy link
Contributor Author

Copilot AI commented Dec 11, 2025

@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?

Added a "Pre-Pull Request Requirements" section to .github/instructions/rust.instructions.md with explicit instructions to run cargo fmt and cargo clippy --fix before opening PRs. Commit: fb375d2

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 becheran marked this pull request as ready for review December 11, 2025 21:21
@becheran becheran merged commit 9af1e7a into master Dec 11, 2025
9 checks passed
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.

2 participants