Rename fields#1149
Conversation
…ationGeneratorTests
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an EditorConfig naming rule and an AGENTS.md convention requiring private fields to use camelCase without underscore prefix. Applies this rename across ChangescamelCase private field naming enforcement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.editorconfig:
- Around line 309-312: Remove the duplicate definition of the private_fields
naming symbol specification in the .editorconfig file. The symbol specification
for private_fields (including
dotnet_naming_symbols.private_fields.applicable_kinds,
dotnet_naming_symbols.private_fields.applicable_accessibilities, and
dotnet_naming_symbols.private_fields.required_modifiers) is defined twice, with
the duplicate appearing after an earlier definition. Delete the second duplicate
occurrence of this entire private_fields symbol specification block to avoid
maintenance confusion and since EditorConfig uses the last definition.
In `@src/Refitter.Core/DocumentMerger.cs`:
- Around line 16-19: The DocumentMerger constructor has a self-assignment bug
where the parameter `comparer` is being assigned to itself instead of to the
instance field. Fix this by using the `this` keyword to explicitly assign the
constructor parameter to the instance field, changing the assignment from
`comparer = comparer;` to `this.comparer = comparer;`. This will ensure the
instance field is properly initialized so that subsequent calls to
`MergeIfMissingOrConflict` can safely use the comparer without encountering a
NullReferenceException.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f1c52503-5f84-4705-a8d2-d83c138bf7f0
📒 Files selected for processing (7)
.editorconfigdocs/AGENTS.mddocs/prd/prd-04-deepen-interface-generator.mdsrc/Refitter.Core/ApizrOptionsBuilder.cssrc/Refitter.Core/DocumentMerger.cssrc/Refitter.Core/Settings/RefitGeneratorSettings.cssrc/Refitter.Tests/XmlDocumentationGeneratorTests.cs
💤 Files with no reviewable changes (1)
- docs/prd/prd-04-deepen-interface-generator.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1149 +/- ##
=======================================
Coverage 94.54% 94.54%
=======================================
Files 67 67
Lines 3100 3100
=======================================
Hits 2931 2931
Misses 59 59
Partials 110 110
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



This pull request introduces a new naming convention for private fields and refactors several core classes to use camelCase field names instead of the previous underscore-prefixed style. It also updates documentation and code style enforcement to match the new convention. Additionally, a product requirements document (PRD) for deepening the
InterfaceGeneratormodule has been removed.The most important changes are:
Code Style & Naming Conventions:
.editorconfigrules and in documentation (.editorconfig,docs/AGENTS.md). [1] [2] [3] [4]ApizrOptionsBuilder,DocumentMerger, andRefitGeneratorSettings(and related config classes) to use camelCase without an underscore prefix, updating all usages accordingly (src/Refitter.Core/ApizrOptionsBuilder.cs,src/Refitter.Core/DocumentMerger.cs,src/Refitter.Core/Settings/RefitGeneratorSettings.cs). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Documentation:
AGENTS.mdto explicitly state that private fields should not use an underscore prefix and should be camelCase.InterfaceGeneratormodule, indicating the design has either been implemented or is no longer relevant (docs/prd/prd-04-deepen-interface-generator.md).These changes ensure consistency across the codebase regarding private field naming, improve code readability, and align documentation and style enforcement with current team conventions.
Summary by CodeRabbit
camelCasenaming for private/protected instance fields (no leading underscore).