Fix IDE1006 naming on private constants and the EF Relational MSB3277 warning#5
Merged
Merged
Conversation
Private const and static readonly fields are PascalCase by convention, but the naming rule swept all private fields into camelCase and lit up IDE1006 across the codebase. Carve them out, and give IDE1006 itself a severity so naming violations fail the build instead of living only in the IDE. Also pin Microsoft.EntityFrameworkCore.Relational in the Domain floor: EFCore.Design lifted it to 10.0.10 privately, so Domain.Tests resolved the Npgsql provider transitive 10.0.4 and warned MSB3277 on every build. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The IDE flagged IDE1006 on every private constant (for example
ZitadelProvisioning.ApplicationName): the naming rule swept all private fields into camelCase, while the code follows the standard C# convention of PascalCase constants. The rule was wrong, not the code.Changes
constand privatestatic readonlyfields are PascalCase (they are constants in spirit —TimeSpancannot beconst); all other private fields stay camelCase with no underscore. Also setdotnet_diagnostic.IDE1006.severity = warning— per-rule severities only surface in the IDE, so until now naming violations could never fail CI. WithTreatWarningsAsErrorsthey now break the build.ProductReviews.Domain.Tests—EFCore.Design(PrivateAssets=all) lifted Relational to 10.0.10 inside Domain, but tests resolved the Npgsql provider transitive 10.0.4. AddedMicrosoft.EntityFrameworkCore.Relationalto the existing explicit-floor item group in the Domain csproj so the pin flows to every consumer. (MSBuild warnings are not covered byTreatWarningsAsErrors, which is why CI never saw it.).idea/.Verification
dotnet build ProductReviews.slnxwith the new enforcement: 0 warnings, 0 errors — so no naming violation survives anywhere in the solution. Domain tests: 13/13 passed.🤖 Generated with Claude Code