format/configured/dotnet
A formatter is configured
Implements format/configured for dotnet.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | dotnet |
| Scope | each |
| Kind | outcome |
| Source | library v0.4.0 |
| Selected by | fleetlint-recommended@v0.4.0 |
Requirement
dotnet format or CSharpier runs in a hook, the task runner or CI, or the code style is configured (C# style rules in .editorconfig, or a CSharpier configuration) in the project or a parent directory. Another formatter is added with accept:.
Why
Without one formatter every editor reformats differently and diffs fill with whitespace churn that hides the real change.
Fix
Add dotnet format --verify-no-changes to the lint target and a hook; keep the style rules in .editorconfig.
Agent instruction: Add dotnet format --verify-no-changes to the lint target and the dotnet-format hook, with code style rules in .editorconfig; reformat in a separate commit.
Sources
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format (spec)
- https://csharpier.com/ (spec)
- https://fleetlint.org/stacks/#net
Generated by fleetlint docs from catalog v0.4.0.