fleetlint Policy for a fleet of repositories
v0.5
Getting started

lint/configured/dotnet

A linter is configured

Implements lint/configured for dotnet.

Severitywarning
Tiers1, 2
Stacksdotnet
Scopeeach
Kindoutcome
Sourcelibrary v0.2.0
Selected byfleetlint-recommended@v0.2.0

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.2.0.