Skip to content

Codify camelCase private-field naming (no s_ prefix) in .editorconfig#459

Merged
ChrisonSimtian merged 1 commit into
Fallout-build:mainfrom
ChrisonSimtian:conventions/field-naming-editorconfig
Jul 2, 2026
Merged

Codify camelCase private-field naming (no s_ prefix) in .editorconfig#459
ChrisonSimtian merged 1 commit into
Fallout-build:mainfrom
ChrisonSimtian:conventions/field-naming-editorconfig

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Problem

No enforced repo standard for private field naming. Fields are split between the dotnet/runtime s_camelCase style (~100 occurrences, 39 files) and ad-hoc PascalCase. .editorconfig only governs const fields today.

What this does

Adds a dotnet_naming_rule codifying CSharpGuidelines AV1702 (camelCase private fields) + AV1705 (no _/m_/g_/s_ prefixes). Ordered after the existing constant-fields rule so private const still resolves to PascalCase.

Why draft — this is a coordinated workstream

Severity is suggestion deliberately. The ~100 existing s_ fields mean a warning/error flip fails the build until they're renamed. Open questions to settle before this leaves draft:

  • Target severity (suggestionwarningerror?)
  • Sequence the one-time migration sweep (single mechanical PR vs. incremental as files are touched)
  • Confirm PascalCase static-readonly cases (e.g. KnownWords, regex Pattern fields) are in scope for the rename
  • Decide whether AV1708 (Manager/Utility/Helper in type names, e.g. BuildManager) is folded in or tracked separately

The localized s_cancellationHandlerscancellationHandlers rename already landed on #450 as manual cleanup; this PR is the repo-wide follow-up.

🤖 Generated with Claude Code

@ChrisonSimtian ChrisonSimtian added the target/vCurrent Targets the current version label Jul 1, 2026
@ChrisonSimtian ChrisonSimtian self-assigned this Jul 1, 2026
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

@dennisdoomen I think its time to tighten this up a bit more, what do you think?

@dennisdoomen dennisdoomen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is normally caught by SA1309, but we have not enabled the Roslyn analyzers. So yes, this should be there as well.

@ChrisonSimtian ChrisonSimtian marked this pull request as ready for review July 2, 2026 22:53
Codify CSharpGuidelines AV1702 (camelCase private fields) and AV1705 (no
`_`/`m_`/`g_`/`s_` field prefixes) as a dotnet_naming_rule. Ordered after the
existing constant-fields rule so private const still resolves to PascalCase.

Severity is suggestion for now — the repo still carries ~100 `s_`-prefixed
static fields. Promoting to warning/error is gated on a one-time migration
sweep, which is the coordination this PR is tracking. Draft until we agree
the target severity and sequence the rename.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian force-pushed the conventions/field-naming-editorconfig branch from 106556d to dc46302 Compare July 2, 2026 22:53
@ChrisonSimtian ChrisonSimtian enabled auto-merge (rebase) July 2, 2026 22:54
@ChrisonSimtian ChrisonSimtian merged commit 68ed725 into Fallout-build:main Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants