@@ -54,20 +54,34 @@ dotnet test --configuration Release --logger "trx;LogFileName=test-results.trx"
54
54
55
55
# 3. Check formatting
56
56
dotnet format style --verify-no-changes --no-restore --verbosity detailed # NEVER CANCEL: ~23s
57
+
58
+ # 4. Run dogfooding process (validate analyzers work on own codebase)
59
+ # Use MCP server run_dogfood tool or manual process via CI workflow
60
+
61
+ # 5. Verify code coverage meets 80% SonarCloud requirement
62
+ # Use MCP server analyze_coverage tool to check coverage gaps
57
63
```
58
64
59
- Total validation time: ~ 2m 32s - NEVER CANCEL these commands.
65
+ Total validation time: ~ 2m 32s + dogfood/coverage checks - NEVER CANCEL these commands.
60
66
61
67
### Dogfooding Process
62
68
This repository uses a "dogfooding" process where the analyzers analyze their own code:
63
69
- Build creates analyzer packages with ` .Dogfood ` suffix
64
70
- Analyzers are then applied to the codebase itself
65
71
- All analyzer violations must be fixed, not suppressed
66
72
73
+ ### Code Coverage Requirements
74
+ SonarCloud enforces ** 80% code coverage** and will fail the build if this threshold is not met:
75
+ - Current coverage is over 90%, so maintain this high standard
76
+ - Use the ** MCP server ` analyze_coverage ` tool** to identify coverage gaps and get actionable suggestions
77
+ - Tool provides specific test templates and prioritizes areas needing coverage
78
+ - Focus testing on error handling, edge cases, and complex logic paths
79
+
67
80
### Mandatory CI Requirements
68
81
The CI process enforces these checks that will cause build failures:
69
82
- All tests must pass (1903 tests)
70
83
- Code formatting must be perfect (no deviations from .editorconfig)
84
+ - ** 80% code coverage minimum** (enforced by SonarCloud)
71
85
- All analyzer warnings must be addressed (no suppressions allowed)
72
86
- Dogfood process must complete successfully
73
87
@@ -121,7 +135,7 @@ All code MUST strictly follow these .editorconfig rules:
121
135
122
136
** FORMATTING IS ZERO-TOLERANCE** : Any violation fails the build (IDE0055.severity = error)
123
137
124
- ** Auto-fix tool available** : Use the MCP server ` fix_formatting ` tool to auto-correct all formatting issues instead of manual fixes .
138
+ ** Auto-fix available** : Use the MCP server ` fix_formatting ` tool to auto-correct all formatting violations .
125
139
126
140
### Creating New Analyzers
127
141
When creating new analyzers:
@@ -144,6 +158,7 @@ Analyzers run during compilation and must be performant:
144
158
- ** Title format** : Must follow Conventional Commits (feat:, fix:, docs:, etc.)
145
159
- ** All tests pass** : 1903 tests must pass
146
160
- ** Formatting perfect** : Zero formatting violations
161
+ - ** 80% code coverage** : Maintained or improved coverage required
147
162
- ** No suppressions** : Fix underlying issues, don't suppress warnings
148
163
- ** Documentation** : Update relevant docs in Documentation/ folder
149
164
@@ -178,22 +193,19 @@ dotnet clean # Removes packages automatically
178
193
179
194
### Troubleshooting
180
195
181
- ### ⚠️ Formatting Issues (IDE0055)
182
- ** Most common CoPilot failure** : Formatting violations that consume 25% of agent effort.
196
+ ### Formatting Issues (IDE0055)
197
+ ** Common CoPilot failure** : Formatting violations consume significant agent effort.
183
198
184
- ** SOLUTION** : Use the MCP server ` fix_formatting ` tool:
185
- 1 . Automatically corrects CRLF line endings (not LF)
186
- 2 . Fixes indentation to tabs (not spaces)
187
- 3 . Applies all .editorconfig rules
188
- 4 . Ensures CI compliance
199
+ ** Quick fix** : Use the MCP server ` fix_formatting ` tool to automatically correct CRLF line endings, tabs, braces, and other .editorconfig violations.
189
200
190
201
** Manual check** : ` dotnet format style --verify-no-changes --no-restore --verbosity detailed `
191
202
192
203
### Build Failures
193
204
If builds fail:
194
- 1 . Check formatting first : ` dotnet format style --verify-no-changes --no-restore --verbosity detailed `
195
- 2 . Run clean build : ` dotnet clean && dotnet build --configuration Release `
205
+ 1 . Run clean build : ` dotnet clean && dotnet build --configuration Release `
206
+ 2 . Check formatting : ` dotnet format style --verify-no-changes --no-restore --verbosity detailed `
196
207
3 . Review analyzer violations - fix the code, don't suppress warnings
208
+ 4 . Verify code coverage meets 80% requirement
197
209
198
210
### Test Failures
199
211
If tests fail:
0 commit comments