Skip to content

fix(FC0002): check casing inside page customizations - #627

Merged
Arthurvdv merged 1 commit into
mainfrom
fix/fc0002-pagecustomization
Nov 15, 2026
Merged

Arthurvdv merged 1 commit into
mainfrom
fix/fc0002-pagecustomization

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

CasingMismatchKeyword and CasingMismatchIdentifier registered on every application object and extension kind except pagecustomization, so a page customization body was never walked. Both analyzers now also register on SymbolKind.PageCustomization. A customization symbol is an IPageExtensionBaseTypeSymbol, so its modify/move* targets and properties resolve through the same paths as a page extension body. PageCustomizationObject was already in the identifier skip list for the object name.

  • New PageCustomization HasDiagnostic/NoDiagnostic fixtures for both suites (CasingMismatchKeyword, CasingMismatchDeclaration). They cover mis-cased keywords (pagecustomization, customizes, layout, actions, modify, moveafter, true/false) and identifiers (the customizes target, field and action names in modify/moveafter, the Visible property). 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.
  • Rule doc .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.
  • No docs PR: FormattingCop/FC0002.md on alcops.dev does not list object kinds.

Closes #620

EnumProvider overlap with #626

EnumProvider.SymbolKind.PageCustomization was 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 the Unresolved sentinel.

Verification

  • dotnet build ALCops.sln: 0 errors
  • dotnet test src/ALCops.FormattingCop.Test/: 216 passed (CasingMismatch filter: 87 passed)
  • dotnet test src/ALCops.Common.Test/: 159 passed
  • Release builds with ContinuousIntegrationBuild=true for FormattingCop and Common (netstandard2.1, net8.0, net10.0): 0 warnings, 0 errors
  • dotnet format ALCops.sln --verify-no-changes: clean
  • Validate-Rules.ps1: OK

Review

Two /code-review high rounds.

Open findings, justified and not changed:

  • Fixtures cover only modify and moveafter. The other move* forms have the same syntax shape, and the CodeFix does not depend on the object kind.
  • The per-method 13.0 skip blocks repeat. This follows the existing per-suite gate pattern; RequireMinimumVersion does not apply because the other cases have no such requirement.
  • The symbol-kind registration list is duplicated across the two analyzers. This predates the PR and is out of scope for a minimal fix.

🤖 Generated with Claude Code

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>
@Arthurvdv
Arthurvdv merged commit 6e743fd into main Nov 15, 2026
53 checks passed
@Arthurvdv
Arthurvdv deleted the fix/fc0002-pagecustomization branch November 15, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FC0002: page customization bodies are not checked

1 participant