-
Notifications
You must be signed in to change notification settings - Fork 60
Add copilot-instructions.md to guide infrastructure maintenance #1893
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
…arameter Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
|
@copilot Add a section about code review. In that section, make sure to point out common documents that might need to be updated when changes are made. Common examples include:
|
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Added a "Code Review Guidelines" section that covers:
Commit: 2d2bb6c |
.github/copilot-instructions.md
Outdated
|
|
||
| ## Additional Context | ||
|
|
||
| - **.NET SDK Version**: Defined in `global.json` (currently 9.0.300) |
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.
| - **.NET SDK Version**: Defined in `global.json` (currently 9.0.300) | |
| - **.NET SDK Version**: Defined in `global.json` |
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.
Applied. Removed the hardcoded version number to prevent documentation from becoming stale.
Commit: 7586446
Co-authored-by: mthalman <15789599+mthalman@users.noreply.github.com>
lbussell
left a comment
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.
@copilot, a general comment - exclude all code formatting and style preferences from this document. Any code style preferences should be expressed in .editorconfig. They should be enforced by emitting build warnings or errors. We should strive to have formatting issues fixed by running dotnet format --include <files> instead of duplicating code style preferences in the copilot instructions.
.github/copilot-instructions.md
Outdated
| - **License header required**: All C# files must start with: | ||
| ```csharp | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| ``` |
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.
Not needed. This is covered by .editorconfig and will show up as an error in the IDE if it's missing.
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.
Removed the entire Coding Standards section, including license header requirements and all formatting/style rules.
Commit: c9e8a17
.github/copilot-instructions.md
Outdated
| - **Indentation**: 4 spaces (no tabs) | ||
| - **Braces**: Allman style - opening braces on new lines | ||
| - **Field naming**: | ||
| - Private/internal fields: `_camelCase` prefix | ||
| - Static fields: `s_camelCase` prefix | ||
| - Constants: `PascalCase` | ||
| - **Avoid `this.`** unless necessary | ||
| - **Use `var`** only when type is clear | ||
| - **Prefer keywords** over BCL types (e.g., `string` not `String`) | ||
| - **TreatWarningsAsErrors**: Enabled - all warnings must be resolved |
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.
All of this should be covered/enforced by editorconifg rules that cause code warnings or errors. We should strive to have this completely fixable using dotnet format.
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.
Removed all code formatting and style preferences from the document. These are enforced by .editorconfig and fixable via dotnet format.
Commit: c9e8a17
…s.md Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Head branch was pushed to by a user without write access
Removed all code formatting and style preferences. The document now focuses on repository structure, documentation maintenance patterns, and workflows rather than duplicating .editorconfig rules. Commit: c9e8a17 |
Plan for Adding copilot-instructions.md
.github/copilot-instructions.mdfile with repository-specific instructionsKey Design Decision
Code formatting and style preferences are intentionally excluded from this document. All formatting rules are enforced by
.editorconfigand fixable viadotnet format, preventing duplication and maintenance burden.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.