format

star 163

Format C# files with CSharpier and verify the build passes. Use when formatting code, fixing build errors from formatting, or before committing changes.

Altinn By Altinn schedule Updated 4/13/2026

name: format description: Format C# files with CSharpier and verify the build passes. Use when formatting code, fixing build errors from formatting, or before committing changes.

Format specific files

dotnet csharpier format <file-or-directory>

Format all changed files

dotnet csharpier format .

Verify formatting passes the build

dotnet build

The build enforces CSharpier formatting — unformatted files cause build errors.

Configuration

Config file: .csharpierrc.yaml

  • Print width: 120 characters
  • Tab width: 4 spaces
  • Use tabs: false

When to format

  • Always format new or modified C# files before committing.
  • Run on generated files (e.g., EF Core migrations) before committing.
  • If the build fails with formatting errors, run dotnet csharpier format on the offending files.
Install via CLI
npx skills add https://github.com/Altinn/altinn-studio --skill format
Repository Details
star Stars 163
call_split Forks 96
navigation Branch main
article Path SKILL.md
More from Creator