Skip to content

Strengthen Copilot instructions#426

Merged
rjmurillo merged 2 commits intomainfrom
codex/explain-codebase-structure-and-pointers
Jun 4, 2025
Merged

Strengthen Copilot instructions#426
rjmurillo merged 2 commits intomainfrom
codex/explain-codebase-structure-and-pointers

Conversation

@rjmurillo
Copy link
Copy Markdown
Owner

@rjmurillo rjmurillo commented Jun 1, 2025

Summary

  • expand the guidelines for Copilot in .github/copilot-instructions.md
  • add build/test commands as a code block
  • mention docs link and optional benchmarks

Testing

  • dotnet format whitespace
  • dotnet format style
  • dotnet build /p:PedanticMode=true /p:SquiggleCop_AutoBaseline=true -warnaserror
  • dotnet test --settings ./build/targets/tests/test.runsettings --no-build (fails: VerifyException)
  • dotnet run --configuration Release --project tests/Moq.Analyzers.Benchmarks (prompts for benchmark selection)

Summary by CodeRabbit

  • Documentation
    • Updated contributor instructions to a more concise and focused format, emphasizing key development principles and streamlined workflows for Moq analyzer contributors.

Copilot AI review requested due to automatic review settings June 1, 2025 09:25
@rjmurillo rjmurillo requested a review from MattKotsenas as a code owner June 1, 2025 09:25
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 1, 2025

Warning

Rate limit exceeded

@rjmurillo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between e8177c7 and b61a4e4.

📒 Files selected for processing (1)
  • .github/copilot-instructions.md (1 hunks)
📝 Walkthrough

Walkthrough

The copilot-instructions markdown file was completely rewritten, replacing a comprehensive, detailed set of programming and contribution guidelines with a concise, Moq-analyzers-specific instruction set. The new version emphasizes clarity, key workflow commands, and focused guidance for contributors, while omitting previous extensive architectural and coding standards content.

Changes

File(s) Change Summary
.github/copilot-instructions.md Replaced detailed, general .NET/C# programming and contribution guidelines with concise, Moq-analyzers-focused instructions.

Suggested labels

documentation


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR strengthens the Copilot instructions by streamlining the developer guidelines in the repository. Key changes include a more concise description of responsibilities, the addition of build/test command code blocks, and updated repository structure and workflow guidelines.

4. Write unit tests for new functionality
5. Document public APIs and complex logic
6. Suggest changes to the `docs/` folder when appropriate
You are an experienced .NET developer working on Roslyn analyzers that guide developers using the Moq framework. Keep your responses clear and concise, follow SOLID, DRY and YAGNI principles, and aim for a grade 9 reading level.
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

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

[nitpick] The new instructions are concise, which is great for readability. However, consider adding a reference or link to the full guidelines or supporting documentation for maintainers who might benefit from additional context.

Copilot uses AI. Check for mistakes.
- Run `dotnet format` before building or testing. The style settings come from `.editorconfig` (based on <https://raw.githubusercontent.com/dotnet/runtime/main/.editorconfig>).
- Build, test, and optionally run benchmarks as shown below:

```bash
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

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

[nitpick] The build/test command code block is a useful addition. It may be beneficial to include a brief comment above the code block outlining its purpose and any prerequisites for running benchmarks.

Copilot uses AI. Check for mistakes.
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Jun 1, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) (target: 95.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ce2edb3) 876 790 90.18%
Head commit (b61a4e4) 876 (+0) 790 (+0) 90.18% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#426) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce2edb3 and e8177c7.

📒 Files selected for processing (1)
  • .github/copilot-instructions.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
.github/copilot-instructions.md

[style] ~6-~6: Consider a different adverb to strengthen your wording.
Context: ...a grade 9 reading level. ## Workflow - Always look for AGENTS.md files and apply an...

(ALWAYS_CONSTANTLY)

🪛 markdownlint-cli2 (0.17.2)
.github/copilot-instructions.md

5-5: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


6-6: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


24-24: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)


30-30: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


31-31: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-24.04-arm)

4. Write unit tests for new functionality
5. Document public APIs and complex logic
6. Suggest changes to the `docs/` folder when appropriate
You are an experienced .NET developer working on Roslyn analyzers that guide developers using the Moq framework. Keep your responses clear and concise, follow SOLID, DRY and YAGNI principles, and aim for a grade 9 reading level.
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.

🧹 Nitpick (assertive)

Add Oxford comma for consistency
Consider adding a comma after “DRY” to improve clarity in the list of principles (“SOLID, DRY, and YAGNI principles”).

🤖 Prompt for AI Agents
In .github/copilot-instructions.md at line 3, add a comma after "DRY" in the
list of principles to include the Oxford comma for clarity and consistency,
changing "SOLID, DRY and YAGNI principles" to "SOLID, DRY, and YAGNI
principles".

Comment on lines +5 to +8
## Workflow
- Always look for `AGENTS.md` files and apply any instructions you find. This repo currently has none, but nested ones may appear.
- Run `dotnet format` before building or testing. The style settings come from `.editorconfig` (based on <https://raw.githubusercontent.com/dotnet/runtime/main/.editorconfig>).
- Build, test, and optionally run benchmarks as shown below:
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.

🧹 Nitpick (assertive)

Ensure blank lines around the Workflow heading and its list
Markdown lint rules (MD022/MD032) require headings and lists to be surrounded by blank lines. For example:

-## Workflow
-- Always look for `AGENTS.md` files…
+-## Workflow
+
+- Always look for `AGENTS.md` files…

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 LanguageTool

[style] ~6-~6: Consider a different adverb to strengthen your wording.
Context: ...a grade 9 reading level. ## Workflow - Always look for AGENTS.md files and apply an...

(ALWAYS_CONSTANTLY)

🪛 markdownlint-cli2 (0.17.2)

5-5: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


6-6: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In .github/copilot-instructions.md around lines 5 to 8, add a blank line before
the "## Workflow" heading and another blank line after the list that follows it
to comply with markdown lint rules MD022 and MD032, ensuring proper spacing
around headings and lists.

Comment on lines +23 to +29
## Guidelines
- Add or update xUnit tests with every new feature or bug fix.
- Keep analyzers efficient, memory friendly, and organized using existing patterns and dependency injection.
- Document public APIs and any complex logic.
- Consult `docs/rules/` for detailed information about each analyzer rule.
- Ask clarifying questions if requirements are unclear.

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.

🧹 Nitpick (assertive)

Fix Markdown spacing for the Guidelines section
Insert blank lines before and after the ## Guidelines heading and its bullet list to satisfy lint rules and improve readability:

-## Guidelines
-- Add or update xUnit tests…
+ 
+## Guidelines
+
+- Add or update xUnit tests…
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Guidelines
- Add or update xUnit tests with every new feature or bug fix.
- Keep analyzers efficient, memory friendly, and organized using existing patterns and dependency injection.
- Document public APIs and any complex logic.
- Consult `docs/rules/` for detailed information about each analyzer rule.
- Ask clarifying questions if requirements are unclear.
## Guidelines
- Add or update xUnit tests with every new feature or bug fix.
- Keep analyzers efficient, memory friendly, and organized using existing patterns and dependency injection.
- Document public APIs and any complex logic.
- Consult `docs/rules/` for detailed information about each analyzer rule.
- Ask clarifying questions if requirements are unclear.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


24-24: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In .github/copilot-instructions.md around lines 23 to 29, add a blank line
before the '## Guidelines' heading and another blank line after the bullet list
under it to improve markdown formatting and comply with lint rules for better
readability.

Comment on lines +30 to +35
## Repository structure
- `src/` – analyzers, code fixes, and tools
- `tests/` – unit tests and benchmarks
- `docs/` – rule documentation
- `build/` – build scripts and shared targets

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.

🧹 Nitpick (assertive)

Fix Markdown spacing for the Repository structure section
Similarly, ensure ## Repository structure and its list entries are framed by blank lines:

-## Repository structure
-- `src/` – analyzers…
+ 
+## Repository structure
+
+- `src/` – analyzers…
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Repository structure
- `src/` – analyzers, code fixes, and tools
- `tests/` – unit tests and benchmarks
- `docs/` – rule documentation
- `build/` – build scripts and shared targets
## Repository structure
- `src/` – analyzers, code fixes, and tools
- `tests/` – unit tests and benchmarks
- `docs/` – rule documentation
- `build/` – build scripts and shared targets
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

30-30: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


31-31: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In .github/copilot-instructions.md around lines 30 to 35, the section titled "##
Repository structure" and its list items are not properly framed by blank lines.
Add a blank line before the "## Repository structure" heading and another blank
line after the list to ensure correct Markdown spacing and formatting.

Add clarification about BDN data
dotnet run --configuration Release --project tests/Moq.Analyzers.Benchmarks
```

Benchmarks are optional and may require additional local configuration. When running benchmarks, capture the markdown output to place as evidence of improvement in your PR description.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line length


Benchmarks are optional and may require additional local configuration. When running benchmarks, capture the markdown output to place as evidence of improvement in your PR description.

## Guidelines
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Headers should be surrounded by blank lines

- Consult `docs/rules/` for detailed information about each analyzer rule.
- Ask clarifying questions if requirements are unclear.

## Repository structure
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Headers should be surrounded by blank lines

You are an experienced .NET developer working on Roslyn analyzers that guide developers using the Moq framework. Keep your responses clear and concise, follow SOLID, DRY and YAGNI principles, and aim for a grade 9 reading level.

## Workflow
- Always look for `AGENTS.md` files and apply any instructions you find. This repo currently has none, but nested ones may appear.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lists should be surrounded by blank lines

Benchmarks are optional and may require additional local configuration. When running benchmarks, capture the markdown output to place as evidence of improvement in your PR description.

## Guidelines
- Add or update xUnit tests with every new feature or bug fix.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lists should be surrounded by blank lines

@qlty-cloud-legacy
Copy link
Copy Markdown

Code Climate has analyzed commit b61a4e4 and detected 11 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 11

View more on Code Climate.

@rjmurillo rjmurillo merged commit f452a0e into main Jun 4, 2025
12 checks passed
@rjmurillo rjmurillo deleted the codex/explain-codebase-structure-and-pointers branch June 4, 2025 16:56
@rjmurillo rjmurillo added this to the vNext milestone Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants