-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update instructions to require automatically building and formatting #3412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 updates the GitHub Copilot instructions to require building and formatting code after making changes, addressing issues where Copilot was generating code with build or formatting errors.
Changes:
- Added instruction to run
dotnet buildafter adding, modifying, or deleting code - Added instruction to run
dotnet formatafter adding or modifying code
| - The top of all *.cs files should have a copyright notice: `// Copyright (c) Microsoft. All rights reserved.` | ||
| - All public methods and classes should have XML documentation comments. | ||
| - After adding, modifying or deleting code, run `dotnet build`, and then fix any reported build errors. | ||
| - After adding or modifying code, run `dotnet format` to automatically fix any formatting errors. |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first instruction mentions "After adding, modifying or deleting code, run dotnet build" but the second instruction only mentions "After adding or modifying code, run dotnet format". This inconsistency is noticeable - if formatting should be run after deletion as well, it should be included; if not, the reasoning should be clear. Consider making these consistent, likely by including "deleting" in the second instruction as well, since deleting code could also affect formatting (e.g., removing code might leave trailing whitespace or empty lines that need formatting).
| - After adding or modifying code, run `dotnet format` to automatically fix any formatting errors. | |
| - After adding, modifying or deleting code, run `dotnet format` to automatically fix any formatting errors. |
Motivation and Context
Copilot is often creating code that fails to build and has formatting errors, so adding some instructions to build and format after any changes.
Description
Contribution Checklist