Skip to content

Format with curb, and check it in CI - #51

Merged
Mpdreamz merged 2 commits into
mainfrom
feature/curb
Nov 11, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
feature/curb

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

Formats the repository with curb and fails CI when a C# file drifts from what curb would produce.

Prompt summary: Every nullean repository adopts curb for formatting, with the shared .editorconfig from nullean/.github, mise run format / mise run check, and a CI check (step 5 of the rollout playbook, as on nullean/proc#42 and nullean/nupkg-validator#33).

Why

Behaviour PRs stay readable only if formatting is never part of them. With one .editorconfig across the org and curb enforcing it in CI, a formatting change is a mise run format away.

What

Config (first commit)

  • .editorconfig is the nullean template, unchanged: braceless single statements, a 160-column max_line_length, the IDE0055 layout. No repo-specific override was needed. The template raises analyzers to warnings, which adds CA warnings to the build (CA2201, CA1510 and CA1822 are the most common), but nothing sets warnings as errors, so the build passes.
  • curb-cli 0.14.0 in dotnet-tools.json (rollForward: false).
  • mise run format runs dotnet curb format .. mise run check runs dotnet curb check . and then zizmor, and mise run ci ends with dotnet curb check ..
  • CI's build job gets a Check formatting (curb) step after the API diff, once the earlier steps have restored the tools.
  • The format skill (.claude/skills/format/SKILL.md) and the task list in AGENTS.md.

Reformat (second commit)

Only dotnet curb format . output: 25 C# files. Namespaces become file-scoped, single-statement ifs move their statement onto its own line, wrapping follows the 160-column limit, and files lose their UTF-8 BOM (charset = utf-8). The 4 F# build files are left alone, because there is no Fantomas in the tool manifest.

Verify

mise run check   # 0 files would change
mise run ci

Locally: a second dotnet curb format . changes nothing, and mise run ci passes. The packages validate, and the API diff suggests the same version change as on main.

🤖 Generated with Claude Code

Mpdreamz and others added 2 commits November 11, 2026 16:02
The nullean `.editorconfig` replaces the repository's own, curb-cli 0.14.0 joins the tool manifest,
`mise run format` formats and `mise run check` fails on drift before zizmor. CI's build job and
`mise run ci` end with `dotnet curb check .`. The format skill documents it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only `dotnet curb format .` output: 25 C# files, which also lose their UTF-8 BOM (`charset = utf-8`).
The 4 F# build files are left alone, as there is no Fantomas in the tool manifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Mpdreamz Mpdreamz added the chore Internal change, no user-visible effect (patch) label Nov 11, 2026
@Mpdreamz
Mpdreamz merged commit dbc1f93 into main Nov 11, 2026
5 checks passed
@Mpdreamz
Mpdreamz deleted the feature/curb branch November 11, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Internal change, no user-visible effect (patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant