fix(generator): filter invalid canonical entries - #1917
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe source generator centralizes formatter grammar property names and simplifies locale validation loops. Calendar item checks reject non-scalar values. Schema tests verify inherited grammar values and obsolete-key removal. Documentation records the updated source fingerprint. ChangesCanonical locale grammar
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
dd677a8 to
e34a405
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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
`@tests/Humanizer.SourceGenerators.Tests/SourceGenerators/CanonicalLocaleSchemaTests.cs`:
- Around line 302-305: Update the assertions around baseLocale.Grammar to assign
it once to a non-null local using the established assertion pattern, then use
that local for GetScalar, Values, and the timeUnitGenders lookup. Avoid repeated
nullable property accesses while preserving the existing assertions.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 347aac5f-200a-4382-9d45-5094afc2ec7f
📒 Files selected for processing (3)
src/Humanizer.SourceGenerators/Common/CanonicalLocaleAuthoring.cstests/Humanizer.SourceGenerators.Tests/SourceGenerators/CanonicalLocaleSchemaTests.cswebsite/docs/contributing/locale-yaml-reference.mdx
Summary
Closes CodeQL alerts #374, #386, #387, #416, #419, #420, #440, #441, and #766. Supersedes safety-closed PRs #1913 and #1914.
Source order, first-invalid diagnostics, grammar property order/values, generated contracts, and incremental dependencies are unchanged.
Validation
dotnet format Humanizer.slnx --verify-no-changes --verbosity diagnosticpwsh -NoLogo -NoProfile -File tools/docs/build.ps1 -Mode Validatedotnet pack src/Humanizer/Humanizer.csproj -c Release -o <temp>pwsh -NoLogo -NoProfile -File tests/verify-packages.ps1 ...Coordination
Head is based on exact main
6a16ff1aa1f15f1cd5fa5f0d6e1331604a54a16dand includes accepted #1911/#1912 fingerprints. Live PR #1902 has no production overlap withCanonicalLocaleAuthoring.cs; shared test/docs hunks are distinct, and #1902 must regenerate its complete fingerprint block after rebasing.