Skip to content

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

Merged
Mpdreamz merged 2 commits into
mainfrom
chore/curb-format
Nov 11, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
chore/curb-format

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.

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, and nobody hand-formats around review comments.

What

Config (first commit)

  • .editorconfig is the nullean template, unchanged except for the repo-specific block at its end (below).
  • 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.
  • CI uses the reusable dotnet-ci workflow, which runs mise run ci, so mise run ci now ends with dotnet curb check ., after the build and tests. That runs on both the ubuntu and macOS legs.
  • The format skill (.claude/skills/format/SKILL.md) and the task list in AGENTS.md.

Repo-specific override

  • [src/Proc.ControlC/**.cs] csharp_style_namespace_declarations = block_scoped:silent. Proc.ControlC targets net40, so it compiles as C# 7.3. The template asks for file-scoped namespaces and curb applies that, which broke the build with CS8370. Curb reads no project files, so it cannot see the language version itself.

Reformat (second commit)

Only mise run format output: 59 C# files. That covers the 160-column max_line_length, the IDE0055 layout, braceless single statements on their own line, and the UTF-8 BOM dropped from files that had one (charset = utf-8). The 18 F# files are left alone: there is no Fantomas in the tool manifest.

Verify

mise run check   # 0 files would change
mise run ci      # 408 tests, 398 passed, 10 skipped: the same as on main before this change

🤖 Generated with Claude Code

Mpdreamz and others added 2 commits November 11, 2026 15:46
Take the shared nullean .editorconfig, add curb-cli 0.14.0 to the tool manifest, add `mise run format`,
make `mise run check` and `mise run ci` fail on formatting drift, and add the format skill.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`mise run format`, nothing else: curb 0.14.0 with the shared nullean .editorconfig.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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