Skip to content

Adopt .editorconfig as single source of truth for code style and add formatting CI gate#53

Merged
craigsmitham merged 3 commits into
mainfrom
editorconfig-code-style-gate
Apr 24, 2026
Merged

Adopt .editorconfig as single source of truth for code style and add formatting CI gate#53
craigsmitham merged 3 commits into
mainfrom
editorconfig-code-style-gate

Conversation

@craigsmitham
Copy link
Copy Markdown
Member

Summary

  • Expand .editorconfig from 4 lines to 323 lines with comprehensive formatting, code style, naming conventions, and analyzer severity rules matching existing project conventions
  • Migrate portable settings out of GraphZen.slnx.DotSettings, keeping only ReSharper-specific features (cleanup profiles, inspection excludes, mandatory imports, user dictionary)
  • Add dotnet format --verify-no-changes CI gate to .github/workflows/ci.yml
  • Enable EnforceCodeStyleInBuild and GenerateDocumentationFile in Directory.Build.props so style violations surface during local builds
  • Auto-fix 49 files with dotnet format (unnecessary usings, missing braces, formatting)

Closes #51

Test plan

  • dotnet build succeeds with zero errors
  • dotnet format --verify-no-changes passes cleanly
  • dotnet test — all 610 tests pass (0 failures)
  • CI workflow passes on all three platforms (ubuntu, windows, macos)
  • Verify ReSharper/Rider still reads .editorconfig rules correctly

🤖 Generated with Claude Code

craigsmitham and others added 3 commits April 23, 2026 21:19
…formatting CI gate

Expand .editorconfig with comprehensive formatting, code style, and naming rules
matching the project's existing conventions. Migrate portable settings out of
GraphZen.slnx.DotSettings (keeping only ReSharper-specific features like cleanup
profiles, inspection excludes, and mandatory imports). Add `dotnet format
--verify-no-changes` CI step and enable EnforceCodeStyleInBuild so style violations
surface during both local builds and CI.

Closes #51

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Let .gitattributes (text=auto) be the sole authority on line endings.
Setting end_of_line=lf in .editorconfig causes dotnet format to conflict
with git's CRLF checkout on Windows. This matches the pattern used by
dotnet/runtime, dotnet/roslyn, and dotnet/aspnetcore.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matches the pattern used by dotnet/runtime, dotnet/roslyn, and dotnet/sdk.
diff=csharp gives better hunk headers in diffs (shows method names),
and eol=lf for shell scripts prevents CRLF issues on Windows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@craigsmitham craigsmitham merged commit 91c0a48 into main Apr 24, 2026
5 checks passed
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.

Adopt .editorconfig as single source of truth for code style and add formatting CI gate

1 participant