DO

dotnet-format + Roslyn

Used in 42 csharp projects (avg ★2205)

C#
Linter / Formatter
Default
Used by 42 projects

Details

Language / Topic
csharpC#
Category
Linter / Formatter

Rules

balanced
- Run `dotnet format` for code formatting. Configure in `.editorconfig` for project-wide style settings.
- Use Roslyn analyzers for static analysis: `dotnet_diagnostic.CAXXXX.severity = warning`.
- Run `dotnet format` in CI to enforce consistent code style — configure rules in `.editorconfig` at the solution root.
- Use `.editorconfig` for IDE-enforced formatting: indent style, naming conventions, code style preferences.
- Enable `EnforceCodeStyleInBuild` in `.csproj` to fail builds on style violations.
- Use `SonarAnalyzer.CSharp` or `Roslynator` NuGet packages for additional analysis rules.
- Run `dotnet format --verify-no-changes` in CI to reject unformatted code.