Skip to content

Docs: brace multi-line bodies; state the exhaustive-switch rule generally#10

Merged
KaliCZ merged 1 commit into
mainfrom
docs/brace-multiline-bodies
Jul 16, 2026
Merged

Docs: brace multi-line bodies; state the exhaustive-switch rule generally#10
KaliCZ merged 1 commit into
mainfrom
docs/brace-multiline-bodies

Conversation

@KaliCZ

@KaliCZ KaliCZ commented Jul 16, 2026

Copy link
Copy Markdown
Owner

The braces rule that came out of reviewing the hampap local-data-snapshot importer, plus a general statement of the switch rule this repo already enforces.

Naming and style — added

  • Brace a loop or conditional body unless it's a true one-liner — a multi-line body (a multi-line call, an object initializer) takes braces even as a single statement; a long method braces even its one-liners.
  • No default/discard arm in a switch over an enum or a type we own — stated generally (it was only in the error-mapping rule 5). Already enforced: .editorconfig has CS8509.severity = error, so no config change here.

Fresh from main; the restructure PR #8 rewrites this same CLAUDE.md, so whichever merges second needs a rebase.

🤖 Generated with Claude Code

…ally

Brace a loop/conditional body unless it's a true one-liner. And state the no-default-arm switch rule generally in Naming and style (it was only in the error-mapping rule 5, though .editorconfig already enforces it via CS8509=error).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@KaliCZ
KaliCZ merged commit 8e30f60 into main Jul 16, 2026
3 checks passed
@KaliCZ
KaliCZ deleted the docs/brace-multiline-bodies branch July 17, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant