Repository navigation
fix(FC0002): check casing inside page customizations - #627
Merged
Merged
Conversation
CasingMismatchKeyword and CasingMismatchIdentifier registered their symbol action on every application object and extension kind except pagecustomization, so the body of a page customization was never walked: mis-cased keywords (modify, moveafter, layout, actions, true/false), property names, and references to the customized page, its fields and its actions went unreported. Both analyzers now also register on SymbolKind.PageCustomization. A customization symbol is an IPageExtensionBaseTypeSymbol, so its body resolves through the same paths as a page extension body, and PageCustomizationObject was already in the identifier skip list for the object name. EnumProvider.SymbolKind gains PageCustomization, which exists at the 12.0 SDK floor like the extension kinds. New PageCustomization fixtures for both suites declare the target page in the same file and are therefore skipped below 13.0. Co-Authored-By: Claude Fable 5.1 <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.
Summary
CasingMismatchKeywordandCasingMismatchIdentifierregistered on every application object and extension kind exceptpagecustomization, so a page customization body was never walked. Both analyzers now also register onSymbolKind.PageCustomization. A customization symbol is anIPageExtensionBaseTypeSymbol, so itsmodify/move*targets and properties resolve through the same paths as a page extension body.PageCustomizationObjectwas already in the identifier skip list for the object name.PageCustomizationHasDiagnostic/NoDiagnostic fixtures for both suites (CasingMismatchKeyword,CasingMismatchDeclaration). They cover mis-cased keywords (pagecustomization,customizes,layout,actions,modify,moveafter,true/false) and identifiers (thecustomizestarget, field and action names inmodify/moveafter, theVisibleproperty). The target page is in the same file, so the fixtures skip below 13.0. Both HasDiagnostic cases failed with "no issue reported" before the analyzer change..claude/rules/diagnostics/fc0002-casing-mismatch.md: updated the Purpose sentence, added a design-decision row (control add-ins stay out, tracked in FC0002: control add-in bodies are not checked for casing mismatches #623) and a Test notes entry for the 13.0 gate.FormattingCop/FC0002.mdon alcops.dev does not list object kinds.Closes #620
EnumProvider overlap with #626
EnumProvider.SymbolKind.PageCustomizationwas missing (CS0117). This PR adds the identical hunk from #626 (same position, same code), so whichever PR merges second rebases without conflict.SymbolKind.PageCustomization(= 21) exists from the 12.0 SDK floor onward, so it never resolves to theUnresolvedsentinel.Verification
dotnet build ALCops.sln: 0 errorsdotnet test src/ALCops.FormattingCop.Test/: 216 passed (CasingMismatch filter: 87 passed)dotnet test src/ALCops.Common.Test/: 159 passedContinuousIntegrationBuild=truefor FormattingCop and Common (netstandard2.1, net8.0, net10.0): 0 warnings, 0 errorsdotnet format ALCops.sln --verify-no-changes: cleanValidate-Rules.ps1: OKReview
Two
/code-review highrounds.Open findings, justified and not changed:
modifyandmoveafter. The othermove*forms have the same syntax shape, and the CodeFix does not depend on the object kind.RequireMinimumVersiondoes not apply because the other cases have no such requirement.🤖 Generated with Claude Code