Skip to content

Add dotnet format via pre-commit and CI#43

Merged
donaldgray merged 2 commits into
mainfrom
feature/pre_commit
May 21, 2026
Merged

Add dotnet format via pre-commit and CI#43
donaldgray merged 2 commits into
mainfrom
feature/pre_commit

Conversation

@donaldgray
Copy link
Copy Markdown
Member

Adds .editorconfig with standard C# Roslyn/VS style rules and a .pre-commit-config.yaml local hook so dotnet format runs on every commit without needing Docker — just the SDK already on PATH. Brace preference is when_multiline, so single-line if statements are left alone and braces are only required when the body is on its own line. The CI pipeline gains a format job gating build-and-test. Applies a one-off format pass to normalise the existing codebase.

donaldgray and others added 2 commits May 21, 2026 11:11
Adds .editorconfig with standard C# Roslyn/VS style rules and a
.pre-commit-config.yaml local hook so dotnet format runs on every
commit without needing Docker — just the SDK already on PATH. Brace
preference is when_multiline, so single-line if statements are left
alone and braces are only required when the body is on its own line.
The CI pipeline gains a format job gating build-and-test. Applies a
one-off format pass to normalise the existing codebase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without an explicit end_of_line setting, dotnet format uses the OS
default — LF on Linux, CRLF on Windows — causing verify-no-changes to
fail in CI. Pin end_of_line = lf for C# files so both environments
agree, and normalise the affected files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@donaldgray donaldgray merged commit 6dd283b into main May 21, 2026
2 checks passed
@donaldgray donaldgray deleted the feature/pre_commit branch May 21, 2026 10:19
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