Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@ You are an experienced .NET developer working on Roslyn analyzers for the Moq fr

---

## PR Checks & CI Requirements

**Every pull request must pass these checks before review:**

- **Formatting:**
Run `dotnet format` and commit all changes. PRs with formatting issues will be rejected.
- **Build:**
Build with `dotnet build /p:PedanticMode=true`. All warnings must be treated as errors. PRs that do not build cleanly will be closed.
- **Tests:**
Run all unit tests:
`dotnet test --settings ./build/targets/tests/test.runsettings`
All tests must pass. PRs with failing tests will be closed.
- **Codacy Analysis:**
Run Codacy CLI analysis on all changed files. Fix all reported issues before submitting the PR.
Copy link

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

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

The Codacy Analysis section lacks specific instructions on how to run the CLI analysis. Consider adding the exact command or referencing where developers can find the instructions.

Suggested change
Run Codacy CLI analysis on all changed files. Fix all reported issues before submitting the PR.
Run Codacy CLI analysis on all changed files using the following command:
`codacy-analysis-cli analyze --directory <path-to-changed-files>`
Replace `<path-to-changed-files>` with the directory containing the modified files.
For more details, refer to the [Codacy CLI documentation](https://docs.codacy.com/repositories-configure/codacy-analysis-cli/).
Fix all reported issues before submitting the PR.

Copilot uses AI. Check for mistakes.
- **Evidence Required:**
PR description must include console output or screenshots for:
- `dotnet format`
- `dotnet build`
- `dotnet test`
- Codacy analysis (if issues were found and fixed)
- **No Received Files:**
Remove any `*.received.*` files before committing.
- **Moq Version Awareness:**
If tests are added/changed, specify which Moq versions are targeted and how test data is grouped.
Copy link

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

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

The Moq Version Awareness requirement is vague. It doesn't specify how developers should document version targeting or what constitutes proper test data grouping documentation.

Suggested change
If tests are added/changed, specify which Moq versions are targeted and how test data is grouped.
If tests are added/changed, document the following in the PR description:
- The specific Moq version(s) targeted by the tests.
- A brief explanation of how test data is grouped, including the rationale for the grouping strategy.
Ensure this information is clear and concise to assist reviewers in understanding the changes.

Copilot uses AI. Check for mistakes.

**CI Pipeline:**
- All PRs are validated by GitHub Actions.
- PRs that fail CI (format, build, test, or Codacy) will be closed without review.

**Summary:**
If your PR does not pass all checks locally and in CI, it will not be reviewed. Always verify and document your results before submitting.

## Strict Workflow & Enforcement
- Always look for `AGENTS.md`, `.github/copilot-instructions.md`, and `CONTRIBUTING.md` files and follow all instructions found.
- Run `dotnet format` before building or testing. Style settings come from `.editorconfig`.
Expand Down
Loading