Skip to content

Commit e8d7c81

Browse files
Add minimal .globalconfig for code analysis and enhance agent documentation (#34)
* Initial plan * Add comprehensive project improvements: .globalconfig, global.json, and enhanced agent documentation Co-authored-by: Malcolmnixon <[email protected]> * Simplify improvements based on feedback: minimal .globalconfig, remove verbose examples Co-authored-by: Malcolmnixon <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Malcolmnixon <[email protected]>
1 parent 005dcbc commit e8d7c81

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

.cspell.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,18 @@
3131
"USERPROFILE",
3232
"LOCALAPPDATA",
3333
"mytool",
34-
"Triaging"
34+
"Triaging",
35+
"globalconfig",
36+
"vbproj",
37+
"vcxproj",
38+
"shproj",
39+
"ruleset",
40+
"resx",
41+
"vsixmanifest",
42+
"vsct",
43+
"MSBuild",
44+
"cyclomatic",
45+
"frontmatter"
3546
],
3647
"ignorePaths": [
3748
"node_modules",

.github/agents/software-quality-enforcer.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ The project uses two analyzer packages:
4343
- Bug detection and code smell identification
4444
- Must be same version in src/ and test/ projects
4545

46+
### Analyzer Configuration
47+
48+
The project uses `.globalconfig` to configure analyzer rules:
49+
50+
- **Responsibility**: The Software Quality Enforcer agent is responsible for maintaining `.globalconfig`
51+
- **Philosophy**: Only explicitly configure rules that need to be disabled or have severity adjusted from defaults
52+
- **Documentation**: Each configured rule should have a comment explaining why it's set to its value
53+
- **Review**: Periodically review configured rules to ensure they're still necessary
54+
- **Quality Metrics**: Monitor code quality through analyzer warnings and build output
55+
4656
### Code Standards
4757

4858
Follow these C# coding standards:

.globalconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
is_global = true
2+
3+
# CA1014: Mark assemblies with CLSCompliant
4+
# Disabled: This project does not require CLS compliance
5+
dotnet_diagnostic.CA1014.severity = none
6+
7+
# CA1017: Mark assemblies with ComVisible
8+
# Disabled: This project does not use COM interop
9+
dotnet_diagnostic.CA1017.severity = none
10+
11+
# CA1303: Do not pass literals as localized parameters
12+
# Disabled: This project does not support localization
13+
dotnet_diagnostic.CA1303.severity = none
14+
15+
# CA1707: Identifiers should not contain underscores
16+
# Disabled: Test methods use underscores for readability
17+
dotnet_diagnostic.CA1707.severity = none
18+
19+
# CA1848: Use the LoggerMessage delegates
20+
# Disabled: This project does not use Microsoft.Extensions.Logging
21+
dotnet_diagnostic.CA1848.severity = none
22+
23+
# CA2007: Consider calling ConfigureAwait on the awaited task
24+
# Disabled: Not applicable for console applications
25+
dotnet_diagnostic.CA2007.severity = none

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ Quality checks are automated through GitHub Actions:
148148

149149
- **Spelling**: Checked using `cspell` against `.cspell.json` configuration
150150
- **Markdown Linting**: Validated using `markdownlint-cli` against `.markdownlint.json` configuration
151+
- **Code Analysis**: Microsoft.CodeAnalysis.NetAnalyzers and SonarAnalyzer.CSharp
152+
- **Analyzer Configuration**: `.globalconfig` file contains explicitly configured rules with explanations
153+
- **Build Validation**: Zero-warning builds enforced via `TreatWarningsAsErrors`
151154

152155
## Agent Instructions
153156

0 commit comments

Comments
 (0)