Tool .NET Quality v1.0.0

dotnet format

Use the free first-party `dotnet format` CLI for .NET formatting and analyzer fixes. USE FOR: the repo uses dotnet format; you need a CI-safe formatting check for .NET; the repo wants .editorconfig-driven style enforcement. DO NOT USE FOR: repositories that intentionally use CSharpier as the only formatter; analyzer strategy with no formatting command change. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

Trigger On

  • the repo uses dotnet format
  • you need a CI-safe formatting check for .NET
  • the repo wants .editorconfig-driven style enforcement

Workflow

  1. Prefer the SDK-provided dotnet format command instead of inventing custom format scripts.
  2. Start with verify mode in CI: dotnet format TARGET --verify-no-changes.
  3. Use narrower subcommands only when the repo needs them:

- whitespace - style - analyzers

  1. Keep .editorconfig as the source of truth for style preferences.
  2. If the repo also uses CSharpier, document which tool owns which file types or rules.

Deliver

  • explicit dotnet format commands for local and CI runs
  • formatting that follows .editorconfig

Validate

  • formatting is reproducible on CI
  • no overlapping formatter ownership is left ambiguous

Load References

Related skills