chore(naming): align editorconfig with dotnet/runtime, single source#99
Conversation
NamingConvention.editorconfig is the single canonical source for naming rules. Removed the bogus static_readonly_fields → PascalCase rule (dotnet/runtime doesn't have it; static_fields rule already covers private/internal static incl. readonly with s_ prefix). Stripped duplicate naming-rule sections from /.editorconfig and tools/.editorconfig — they conflicted with the SDK config and forced private static readonly fields to _camelCase. Directory.Build.props now injects NamingConvention.editorconfig via EditorConfigFiles so this repo's own projects (which use Microsoft.NET.Sdk directly) consume the same rules SDK consumers get. Renamed 7 private static readonly fields _xxx → s_xxx in tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (5)
📜 Recent review details⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (2)tests/**/*.cs⚙️ CodeRabbit configuration file
Files:
**/*.props⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (5)
Summary by CodeRabbitRelease Notes
WalkthroughDirectory.Build.props now injects the repository's NamingConvention.editorconfig to enforce naming conventions across projects. The editorconfig is updated to clarify that ChangesStatic Field Naming Convention Enforcement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Review rate limit: 3/5 reviews remaining, refill in 23 minutes and 6 seconds. Comment |
|
@coderabbitai autofix |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Summary
src/Config/NamingConvention.editorconfigis now the canonical naming-rule source. Removed the bogusstatic_readonly_fields → PascalCaserule (dotnet/runtime doesn't have it;static_fieldsrule already covers private/internal static incl. readonly withs_prefix)./.editorconfigandtools/.editorconfig— they conflicted with the SDK config and forced private static readonly fields to_camelCasein this repo's own builds.Directory.Build.propsinjectsNamingConvention.editorconfigviaEditorConfigFilesso this repo's own projects (which useMicrosoft.NET.Sdkdirectly) eat their own dog food._xxx→s_xxxin tests.Result aligns with dotnet/runtime coding-style and Microsoft Learn naming guidance: const → PascalCase, private/internal static (incl. readonly) →
s_camelCase, private/internal instance →_camelCase. Public/protected falls through to the PascalCase fallback.Test plan
dotnet buildclean (0 warnings, 0 errors)