From dc4630252180bfd1283933e80cbc6b0bf105b73b Mon Sep 17 00:00:00 2001 From: Chrison Simtian Date: Wed, 1 Jul 2026 13:53:01 +1200 Subject: [PATCH] Add camelCase private-field naming rule to .editorconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .editorconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.editorconfig b/.editorconfig index 8dc74a82..75d4ef23 100644 --- a/.editorconfig +++ b/.editorconfig @@ -70,6 +70,20 @@ dotnet_naming_symbols.constant_fields.required_modifiers = const dotnet_naming_style.pascal_case_style.capitalization = pascal_case +# name private fields (instance and static) using camelCase, with no _ / m_ / g_ / s_ prefix +# CSharpGuidelines AV1702 (camelCase private fields) + AV1705 (no field prefixes). +# Ordered after constant_fields so private const still resolves to PascalCase above. +# Severity is suggestion for now: the repo still carries ~100 s_-prefixed fields, so a +# warning/error flip is gated on the one-time migration sweep (see PR description). +dotnet_naming_rule.private_fields_should_be_camel_case.severity = suggestion +dotnet_naming_rule.private_fields_should_be_camel_case.symbols = private_fields +dotnet_naming_rule.private_fields_should_be_camel_case.style = camel_case_style + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_style.camel_case_style.capitalization = camel_case + # Code style defaults csharp_using_directive_placement = outside_namespace:warning dotnet_sort_system_directives_first = true