-
Notifications
You must be signed in to change notification settings - Fork 0
how to contribute patterns and conventions
Dom edited this page Jun 21, 2026
·
1 revision
- C# 14 (net10.0), file-scoped namespaces, nullable reference types, switch expressions, pattern matching
- Warnings as Errors enabled via
Directory.Build.props(TreatWarningsAsErrors=true) -
EnableNETAnalyzers=true,AnalysisLevel=latest,AnalysisMode=latest-Recommended -
AnalysisModeSecurity=Allfor security-focused rules -
Deterministic=truefor reproducible builds -
InvariantGlobalization=truefor culture-invariant string operations
The project uses multiple Roslyn analyzer packages configured in Directory.Build.props:
| Analyzer | Purpose |
|---|---|
| Roslynator.Analyzers | Code quality and refactoring rules |
| Roslynator.Formatting.Analyzers | Formatting enforcement |
| Roslynator.CodeAnalysis.Analyzers | Roslyn API usage rules |
| Meziantou.Analyzer | Additional best-practice rules |
| Microsoft.CodeAnalysis.BannedApiAnalyzers | Banned API enforcement via BannedSymbols.txt
|
| FgrFlatAccessAnalyzer (custom) | Enforces architectural boundaries on FileGenerationRequest
|
- Distribution algorithms must be O(1) per file
- Use
Span<T>,ArrayPool<T>in hot paths, avoid allocations - ZIP entry paths always use
/; normalize to backslashes with.Replace('/', '\\') - Never use
Replace(Path.DirectorySeparatorChar, '\\')(no-op on Windows)
All code, comments, documentation, and reviews must use canonical terms from UBIQUITOUS_LANGUAGE.md. Non-canonical terms are flagged in review even when they seem simpler.
- Class:
{Subject}Tests(e.g.,BatesNumberGeneratorTests) - Method:
{Method}_{Scenario}_{Expected}(e.g.,Generate_WithCustomPrefix_ShouldIncludePrefix)
Before refactoring code producing Load File / Audit File / Production Set output, capture a seeded golden baseline as a content-hash manifest. Diff after every step. Byte-for-byte parity is what makes it safe to restructure writers. Preserve historical output quirks (EOL, encoding, path separators) exactly.
Do not add // <copyright ...> or file-level license headers. This is an intentional project convention enforced by the .coderabbit.yaml review instructions.
- Fix root causes, not symptoms. Never implement workarounds.
- If you cannot find the root cause, compile what you have learned and report it.
- Tests must verify real outcomes, not mocked behavior.