Skip to content

fix(LC0092): check extension object names against the Object pattern - #626

Merged
Arthurvdv merged 1 commit into
mainfrom
fix/lc0092-extension-object-names
Nov 15, 2026
Merged

Arthurvdv merged 1 commit into
mainfrom
fix/lc0092-extension-object-names

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Summary

LC0092 (NamingPattern) checked object names only on base object kinds. The names of tableextension, pageextension, reportextension, enumextension, permissionsetextension, profileextension and pagecustomization objects were never checked, although the members inside them were.

  • NamingPattern.cs: the AnalyzeObject registration now also covers those seven SymbolKinds. They reuse the Object naming target and the existing AppSourceCop affix stripping, so there is no settings or schema change.
  • EnumProvider.SymbolKind gains PageCustomization, the one kind Common did not expose. All seven kinds exist at the 12.0 SDK floor (checked in nav-sdk-source v12.0).
  • Fixtures:
    • HasDiagnostic ObjectExtensionLowerCaseStart (table, page, report, enum and permission set extensions), ProfileExtensionLowerCaseStart and PageCustomizationLowerCaseStart.
    • NoDiagnostic *PascalCase counterparts of all three.
    • All six are gated on 13.0 because each target is declared in the same file. The two profile-extension fixtures are also gated on 14.0, since Feature.ProfileExtensions requires runtime Fall2024.
    • The HasDiagnostic cases failed before the analyzer change.
  • Rule doc lc0092-naming-pattern.md: Purpose kind list, a Design-decision row, an SDK fact and a Test notes bullet.

This is a behaviour change for existing users. Lowercase-starting extension names that passed before are now reported under the Object target, which is the intended fix for the false negative.

Closes #619

Companion docs PR: ALCops/alcops.dev#219

Verification

  • dotnet test src/ALCops.LinterCop.Test/ --filter NamingPattern: 102/102 passed.
  • Full LinterCop test suite: 452/452 passed.
  • Common tests: 159/159 passed.
  • Three-TFM Release build of LinterCop (ContinuousIntegrationBuild=true): 0 warnings, 0 errors.
  • dotnet format --verify-no-changes: clean.
  • Validate-Rules.ps1: OK.

Review: 1 round of /code-review high, no correctness findings. These non-correctness findings were left open, with justification:

  • Upgrade impact: intended. The rule now reports what it always should have; the scope is noted above.
  • No affix-stripping fixture for extensions: the NamingPattern test class does not inject AppSourceCop affixes, so there is no harness for it. Extensions go through the same AnalyzeObject stripping path as base objects.
  • Gates verified only on the net10.0 leg locally: the 12.0 and 16.0 CI legs confirm them.
  • Extract the 16-kind list into a shared array: declined to keep the diff minimal. The list has one user.

🤖 Generated with Claude Code

NamingPattern registered its object-name check on the base object kinds
only, so the names of tableextension, pageextension, reportextension,
enumextension, permissionsetextension, profileextension and
pagecustomization objects were never matched, although the members
inside them were. The object-name callback now also runs on those seven
symbol kinds. It reuses the Object naming target and the existing
AppSourceCop affix stripping, so no settings or schema change is needed.

EnumProvider.SymbolKind gains PageCustomization, which exists at the
12.0 SDK floor like the six extension kinds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Arthurvdv
Arthurvdv merged commit 38ecbf6 into main Nov 15, 2026
104 of 105 checks passed
@Arthurvdv
Arthurvdv deleted the fix/lc0092-extension-object-names branch November 15, 2026 17:00
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.

LC0092: extension object names are not checked against the Object pattern

1 participant