Skip to content

Simplify and modernize code style configuration#56

Merged
craigsmitham merged 1 commit intomainfrom
simplify-code-style-config
Apr 24, 2026
Merged

Simplify and modernize code style configuration#56
craigsmitham merged 1 commit intomainfrom
simplify-code-style-config

Conversation

@craigsmitham
Copy link
Copy Markdown
Member

Summary

Closes #55

  • Phase 1: Remove ~50 redundant .editorconfig settings matching Roslyn defaults (formatting rules, parentheses preferences, default-value code style options). Replace ~35 individual :suggestion severities with a single dotnet_analyzer_diagnostic.category-Style.severity = suggestion bulk line, keeping only targeted overrides for warning and silent rules.
  • Phase 2: Add 8 modern C# 10-13 style rules: primary constructors, collection expressions, extended property patterns, readonly struct/member, method group conversion, null check over type check, top-level statements.
  • Phase 3: Add resharper_place_field_attribute_on_same_line and resharper_wrap_object_and_collection_initializer_style to align JB cleanupcode output with dotnet format.
  • Phase 4: Remove 14 .DotSettings inspection severities now covered by .editorconfig equivalents. Remove 2 duplicate mandatory imports already in Directory.Build.props.

Net result: .editorconfig reduced from 328 to 210 lines (-36%) with no loss of enforcement.

Verification

  • dotnet build — 0 warnings, 0 errors
  • dotnet format --verify-no-changes — passes
  • dotnet build --configuration Release with EnforceCodeStyleInBuild=true — 0 warnings
  • All tests pass (0 failures)

Test plan

  • CI passes (build, format check, tests) on all matrix OSes
  • Verify JB cleanupcode idempotency: dotnet formatjb cleanupcode --no-builtin-settingsgit diff --exit-code

🤖 Generated with Claude Code

- Remove ~50 redundant .editorconfig settings that match Roslyn defaults
- Replace ~35 individual :suggestion severities with bulk category-Style severity
- Add modern C# 10-13 style rules (primary constructors, collection expressions, etc.)
- Add resharper_* settings to align JB cleanupcode with dotnet format output
- Remove 14 .DotSettings inspection severities covered by .editorconfig equivalents
- Remove duplicate mandatory imports already in Directory.Build.props

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

Simplify and modernize code style configuration (.editorconfig + .DotSettings)

1 participant