lint/configured/dotnet
A linter is configured
Implements lint/configured for dotnet.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | dotnet |
| Scope | each |
| Kind | outcome |
| Source | library v0.3.1 |
| Selected by | fleetlint-recommended@v0.3.1 |
Requirement
The .NET analyzers are configured for every project: <AnalysisLevel> or <AnalysisMode> in Directory.Build.props (or each project file), dotnet_analyzer_diagnostic.severity raised to warning or error in .editorconfig, or an analyzer package (StyleCop, Sonar, Roslynator, Meziantou). Another analyzer is added with accept:.
Why
Per-project settings drift; one file at the root makes every project in the solution compile under the same rules.
Fix
Add Directory.Build.props with Nullable, TreatWarningsAsErrors and AnalysisLevel (fleetlint fix --apply writes it).
Agent instruction: Add Directory.Build.props from the template at the repository root and fix the warnings that become errors instead of lowering the level.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
See: https://fleetlint.org/baseline/#static-analysis, https://fleetlint.org/stacks/#net
Generated by fleetlint docs from catalog v0.3.1.