Copilot instructions
.github/copilot-instructions.mdCopilot instructions
Quality
72/100
Scores the file, not the repository.Length
380 words
7 headings · 0 code blocksRepository
38k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1## General23* Make only high confidence suggestions when reviewing code changes.4* Always use the latest version C#, currently C# 13 features.5* Never change global.json unless explicitly asked to.6* Never change package.json or package-lock.json files unless explicitly asked to.7* Never change NuGet.config files unless explicitly asked to.89## Formatting1011* Apply code-formatting style defined in `.editorconfig`.12* Prefer file-scoped namespace declarations and single-line using directives.13* Insert a newline before the opening curly brace of any code block (e.g., after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.).14* Ensure that the final return statement of a method is on its own line.15* Use pattern matching and switch expressions wherever possible.16* Use `nameof` instead of string literals when referring to member names.17* Ensure that XML doc comments are created for any public APIs. When applicable, include `<example>` and `<code>` documentation in the comments.1819### Nullable Reference Types2021* Declare variables non-nullable, and check for `null` at entry points.22* Always use `is null` or `is not null` instead of `== null` or `!= null`.23* Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.2425### Testing2627* We use xUnit SDK v3 for tests.28* Do not emit "Act", "Arrange" or "Assert" comments.29* Use Moq for mocking in tests.30* Copy existing style in nearby files for test method names and capitalization.3132## Running tests3334* To build and run tests in the repo, use the `build.sh` script that is located in each subdirectory within the `src` folder. For example, to run the build with tests in the `src/Http` directory, run `./src/Http/build.sh -test`.3536## .NET Environment3738* Before running any `dotnet` commands in this repository, always activate the locally installed .NET environment first by running the appropriate activation script from the repository root:39 * On Windows: `. ./activate.ps1` (from repository root)40 * On Linux/Mac: `source activate.sh` (from repository root)41* If not in the repository root, navigate there first or use the full path to the activation script.42* This ensures that the correct version of .NET SDK is used for the repository.4344## ASP.NET Core Components Area45* When working on issues under the src/Components area, follow the instructions in [./instructions/components.instructions.md](./instructions/components.instructions.md).46
Also in dotnet/aspnetcore
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotnet/aspnetcoreeng/common/AGENTS.md · 38k | AGENTS.md | no sections | 4/100 | 3 days ago | |
| dotnet/aspnetcoresrc/Components/AGENTS.md · 38k | AGENTS.md | buildteststylearch+3 | 96/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| dotnet/roslyn.github/instructions/Compiler.instructions.md · 21k | Copilot instructions | buildteststylearch+3 | 99/100 | 3 days ago | |
| dotnet/roslyn.github/copilot-instructions.md · 21k | Copilot instructions | buildteststylearch+3 | 97/100 | 3 days ago | |
| ardalis/CleanArchitecture.github/copilot-instructions.md · 18k | Copilot instructions | buildteststylearch+4 | 96/100 | 3 days ago | |
| dotnet/maui.github/instructions/integration-tests.instructions.md · 23k | Copilot instructions | setupteststyledo-not | 92/100 | 3 days ago | |
| dotnet/maui.github/instructions/templates.instructions.md · 23k | Copilot instructions | buildteststylearch+1 | 92/100 | 3 days ago | |
| microsoft/WSL.github/copilot-instructions.md · 33k | Copilot instructions | setupbuildtestlint-format+7 | 88/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/start-native-execution.instructions.md · 55k | Copilot instructions | buildstylearchgit+1 | 86/100 | 3 days ago | |
| MaterialDesignInXAML/MaterialDesignInXamlToolkit.github/copilot-instructions.md · 16k | Copilot instructions | setupbuildteststyle+5 | 84/100 | 3 days ago |
