Skip to content

feat(analyzers): renumber to 9 domain bands, 2.0.0 break - #174

Merged
ANcpLua merged 8 commits into
mainfrom
feat/major-renumber
May 25, 2026
Merged

feat(analyzers): renumber to 9 domain bands, 2.0.0 break#174
ANcpLua merged 8 commits into
mainfrom
feat/major-renumber

Conversation

@ANcpLua

@ANcpLua ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

Renumbers all 89 active analyzer rules from a sparse AL0001..AL0139 (~64% density, big gaps) into a clean 9-band 100-wide scheme: AL1000..AL1899. The AL0xxx range is reserved for sibling packages (ANcpLua.AotReflection / ExtensibleEnumMirror / DiscriminatedUnion already occupy AL01/02/03xx). Version bump: 1.29.4 → 2.0.0.

Band Range Rules Domain
0 AL1000..1099 13 Correctness / language pitfalls
1 AL1100..1199 10 ASP.NET Core
2 AL1200..1299 21 Roslyn Utilities (heaviest)
3 AL1300..1399 15 Async / threading / reliability
4 AL1400..1499 10 AOT / trim
5 AL1500..1599 6 Roslyn-author hygiene
6 AL1600..1699 7 Package / version
7 AL1700..1799 4 Style
8 AL1800..1899 3 Agent governance ([LoomTool])

Each band leaves ~79 free slots. Reserved AL1900..1999 for future bands.

Side cleanup

  • 44 orphan AL resx prefix groups deleted (~132 resx keys + ~117 Designer entries) — these are the OTel-shaped rules that previously migrated to Qyl.OpenTelemetry.SemanticConventions.Analyzers. Forensic evidence of the cross-package migration that no consumer depends on.
  • Stale editorconfig blocks removed (the AL0010/AL0012/AL0013 dogfood suppressions, the stray AL0038, AL0074 semconv-folder scoped suppressions left only the still-relevant AL1210).

Plan

Full mapping + cross-team migration audit at eng/analyzer-renumber-plan.md. Cross-team candidates flagged: zero (the closest near-misses — AspNetCore at AL1105-1108, agent-governance at AL1800-1802 — were correctly identified as non-semconv).

Test plan

  • dotnet build: 0/0
  • dotnet test: 757/757 pass
  • dotnet pack src/ANcpLua.Analyzers/ANcpLua.Analyzers.csproj -p:PackageId=ANcpLua.Analyzers -p:Version=2.0.0 (per nuget-publish.yml): clean
  • CI green
  • CodeRabbit clean

After merge

  • dotnet nuget push ANcpLua.Analyzers.2.0.0.nupkg
  • Consumer-repo PRs in qyl + ANcpLua.NET.Sdk + ANcpLua.Roslyn.Utilities + ErrorOrX + TourPlanner (already staged in their respective working trees) bump pins to 2.0.0

🤖 Generated with Claude Code

89 ids were sprawled across AL0001..AL0139 with sparse gaps (~64% density,
big holes at AL0061-0079, AL0085-0093, AL0096-0100, AL0131-0136).
Renumbered to 9 100-wide bands in AL1000..AL1899 — deliberately skipping
AL0xxx because sibling packages already occupy that space:

  ANcpLua.AotReflection         AL0097..0100
  ANcpLua.ExtensibleEnumMirror  AL0200..0202
  ANcpLua.DiscriminatedUnion    AL0300..0303

Bands (full mapping at eng/analyzer-renumber-plan.md):
  AL1000..1099  Correctness / language pitfalls  (13 rules)
  AL1100..1199  ASP.NET Core                     (10)
  AL1200..1299  Roslyn Utilities                 (21)
  AL1300..1399  Async / threading / reliability  (15)
  AL1400..1499  AOT / trim                       (10)
  AL1500..1599  Roslyn-author hygiene            (6)
  AL1600..1699  Package / version                (7)
  AL1700..1799  Style                            (4)
  AL1800..1899  Agent governance ([LoomTool])    (3)

Reserved AL0xxx for sibling-package use; reserved AL1900..1999 for future
bands. Each band leaves ~79 free slots — no future re-renumber required.

Wave delivered by a parallel agent team: planner (488-line plan with
9-band scheme + 89→89 deterministic mapping + cross-team migration
scan), renumber executor (186 git mv + 2,489 substitutions), README
author (single-screen ANcpLua.Agents style, 89-row table grouped by
band), consumer rewirer (330 substitutions across 4 sibling repos),
cleanup (132 reorder ops + 11 stale-id deletions).

Side cleanup: 44 orphan AL resx prefix groups deleted (~132 keys +
~117 Designer entries). Those were the OTel-shaped rules that previously
migrated to Qyl.OpenTelemetry.SemanticConventions.Analyzers — forensic
evidence of the cross-package migration that no consumer depends on.

Cross-team migration candidates flagged: zero. Pure ANcpLua-internal
renumber. ASP.NET Core rules (AL1105-1108) are resilience/health-check
contracts, not OTel semconv; GenAI rules (AL1800-1802) enforce
[LoomTool] agent governance, not gen_ai.* semconv.

Verified locally: 0/0 build, 757/757 tests pass, dotnet pack
src/ANcpLua.Analyzers/ANcpLua.Analyzers.csproj -p:PackageId=ANcpLua.Analyzers
-p:Version=2.0.0 produces the canonical nupkg (per nuget-publish.yml).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@coderabbitai autofix

@claude

claude Bot commented May 25, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 2083 complexity · 187 duplication

Metric Results
Complexity 2083
Duplication 187

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR successfully implements a major renumbering of 89 diagnostic rules into domain-specific bands, aligning with the 2.0.0 version bump. Codacy analysis indicates the project remains up to standards, although the massive refactor has introduced significant structural duplication (187 clones) due to the repetitive nature of analyzer registration boilerplate.

While the primary renumbering logic is sound, there are high-risk areas concerning several complex files that currently lack test coverage, specifically regarding CancellationToken propagation, type hierarchy analysis, and LINQ materialization. Additionally, the breaking nature of this change necessitates a proactive documentation redirect strategy and an update to AI agent instruction sets to prevent the continued generation of legacy AL0xxx IDs.

About this PR

  • This release will invalidate every existing .editorconfig suppression and #pragma warning in dependent codebases. Ensure this impact is prominently highlighted in the release notes beyond the current CHANGELOG entry.
  • Help-link URLs provided by AlAnalyzer.HelpLink will result in 404 errors until the documentation site is redeployed with the new rule paths. A redirect strategy for the old AL0xxx paths is highly recommended to maintain developer experience.
1 comment outside of the diff
src/ANcpLua.Analyzers/AlAnalyzer.cs

line 19 ⚪ LOW RISK
Suggestion: This refactor has significantly increased structural duplication (187 clones). The logic for RegisterActions and SupportedDiagnostics follows a rigid template now repeated across 89 classes. Consider evolving the AlAnalyzer base class to support a more declarative API to reduce maintenance overhead. Suggested prompt for your IDE agent: 'Identify the structural patterns used in RegisterActions and SupportedDiagnostics across the Analyzers folder. Refactor the AlAnalyzer base class to provide a declarative API that automates these registrations based on internal constants.'

Test suggestions

  • Verify renumbered Diagnostic IDs (AL1000-AL1899) satisfy the convention test regex '^AL\d{4}$'
  • Renamed analyzer class names satisfy the naming convention test '^Al\d{4}.*Analyzer$'
  • Orphaned OTel resource keys are removed from both Resources.resx and CodeFixResources.resx
  • Resource-based localization interpolation in AlAnalyzer.CreateRule works with the new 4-digit numeric IDs
  • Static documentation (README) full rule catalog table matches the renumbered IDs and categories
  • Unit test coverage for complex logic in AL1313CancellationTokenPropagationAnalysis.cs
  • Unit test coverage for complex logic in AL1202UseTypeHierarchyAnalyzer.cs
  • Unit test coverage for complex logic in AL1311UnnecessaryLinqMaterializationAnalyzer.cs
  • Unit test coverage for complex logic in AL1500ClosedTypeHierarchySwitchAnalyzer.cs
  • Unit test coverage for complex logic in AL1606OutdatedMafPackageVersionAnalyzer.cs
  • Unit test coverage for complex logic in AL1100ToAL1104FormBindingAnalyzer.cs
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Unit test coverage for complex logic in AL1313CancellationTokenPropagationAnalysis.cs
2. Unit test coverage for complex logic in AL1202UseTypeHierarchyAnalyzer.cs
3. Unit test coverage for complex logic in AL1311UnnecessaryLinqMaterializationAnalyzer.cs
4. Unit test coverage for complex logic in AL1500ClosedTypeHierarchySwitchAnalyzer.cs
5. Unit test coverage for complex logic in AL1606OutdatedMafPackageVersionAnalyzer.cs
6. Unit test coverage for complex logic in AL1100ToAL1104FormBindingAnalyzer.cs

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread CHANGELOG.md

- **Diagnostic ID renumber.** All 89 active diagnostic IDs renumbered into nine 100-wide domain bands (`AL1000..AL1899`) to avoid collisions with sibling analyzer packages (`ANcpLua.AotReflection` AL0097–AL0100, `ANcpLua.ExtensibleEnumMirror` AL0200–AL0202, `ANcpLua.DiscriminatedUnion` AL0300–AL0303). Old `AL0xxx` IDs no longer fire from this assembly. Full old→new mapping in `eng/analyzer-renumber-plan.md` §2. Consumers must rewrite any `.editorconfig` / `.globalconfig` / `#pragma warning disable` / `<NoWarn>` references to the new IDs.
- Resource keys in `Resources.resx` and `CodeFixResources.resx` renamed in lockstep (`AL{old}AnalyzerTitle` → `AL{new}AnalyzerTitle`, etc.).
- Help-link URLs follow the new IDs (`https://ancplua.mintlify.app/analyzers/rules/AL1000` etc.).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Nitpick: Since the AlAnalyzer.HelpLink format is changing, ensure that the documentation site implements a redirect strategy from the old AL0xxx URL paths to the new AL1xxx domain band paths. This will prevent 404 errors for users with legacy .editorconfig settings.

Comment thread AGENTS.md
Comment on lines +38 to +134
Analyzers/AL0XXX*.cs # one analyzer, or one grouped analyzer, per file
Analyzers/AsyncContextHelper.cs
src/ANcpLua.Analyzers.CodeFixes/
CodeFixes/AL0XXX*.cs # One file per code fix
Refactorings/AR0XXX*.cs # Code refactorings
tests/ANcpLua.Analyzers.Tests/ # Tests both analyzers and code fixes (xunit.v3.mtp-v2)
CodeFixes/AL0XXX*.cs
Refactorings/AR0XXX*.cs
tests/ANcpLua.Analyzers.Tests/
AL0XXX*Tests.cs
```

## Analyzer Template
## Analyzer Shape

Single-rule analyzer:

```csharp
namespace ANcpLua.Analyzers.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed partial class Al00xxDescriptiveNameAnalyzer : AlAnalyzer {
private const string DiagnosticId = "AL00XX";

private static readonly DiagnosticDescriptor Rule = CreateRule(
DiagnosticId, DiagnosticCategories.Category, DiagnosticSeverity.Warning);
DiagnosticId,
DiagnosticCategories.Usage,
DiagnosticSeverity.Warning);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [Rule];

protected override void RegisterActions(AnalysisContext context) =>
context.RegisterSyntaxNodeAction(Analyze, SyntaxKind.Whatever);
context.RegisterSyntaxNodeAction(Analyze, SyntaxKind.InvocationExpression);

private static void Analyze(SyntaxNodeAnalysisContext context) {
context.ReportDiagnostic(Rule, location, arg0);
}
}
```

- Each analyzer owns its own `DiagnosticId` as `const string` — NO shared DiagnosticIds class
- **Visibility rule:** `public` only if a `CodeFixProvider` references it, otherwise `private` (matches the official Roslyn SDK template)
- Use `CreateRule()` for single-rule analyzers, manual `new DiagnosticDescriptor(...)` for grouped
- `HelpLink(id)` appends the ID to the Mintlify docs base URL
Naming contract:

| Element | Rule |
| --- | --- |
| File | `Analyzers/AL00XXDescriptiveNameAnalyzer.cs` |
| Class | `Al00xxDescriptiveNameAnalyzer`; use `Al`, not `AL` |
| Modifier | `sealed partial class` |
| Base | `AlAnalyzer` |
| Namespace | `ANcpLua.Analyzers.Analyzers` |
| Diagnostic ID | Per-analyzer `const string`; no central `DiagnosticIds` class |

Diagnostic ID visibility:

## TypeCache Pattern (preferred for 2+ type resolutions)
- `private` by default.
- `public` only when a sibling code fix references it via `FixableDiagnosticIds => [Al00xxAnalyzer.DiagnosticId]`.
- Do not make IDs public preemptively.

Descriptor construction:

- Single-rule analyzers use `CreateRule(id, category, severity)`.
- Grouped analyzers with multiple IDs in one class may manually create `DiagnosticDescriptor` instances with `LocalizableResourceString`.
- Do not manually construct single-rule descriptors.

Grouped analyzer skeleton:

```csharp
private enum KnownType { Task, TaskOfT, ValueTask, ValueTaskOfT }
private static readonly string[] KnownTypeNames = [
"System.Threading.Tasks.Task", "System.Threading.Tasks.Task`1",
"System.Threading.Tasks.ValueTask", "System.Threading.Tasks.ValueTask`1" ];
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed partial class Al1003ToAl1004SpanComparisonAnalyzer : AlAnalyzer {
public const string DiagnosticIdAl1003 = "AL1003";
public const string DiagnosticIdAl1004 = "AL1004";

private static readonly DiagnosticDescriptor RuleAl1003 = new(
DiagnosticIdAl1003,
new LocalizableResourceString(nameof(Resources.AL1003AnalyzerTitle), Resources.ResourceManager, typeof(Resources)),
new LocalizableResourceString(nameof(Resources.AL1003AnalyzerMessageFormat), Resources.ResourceManager, typeof(Resources)),
DiagnosticCategories.Usage,
DiagnosticSeverity.Warning,
true,
new LocalizableResourceString(nameof(Resources.AL1003AnalyzerDescription), Resources.ResourceManager, typeof(Resources)),
HelpLinkBase);

public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [RuleAl1003, RuleAl1004];
}
```

var cache = new TypeCache<KnownType>(
type => context.Compilation.GetTypeByMetadataName(KnownTypeNames[(int)type]));
## Resources And Releases

Each new diagnostic needs three `Resources.resx` keys:

```text
AL00XXAnalyzerTitle
AL00XXAnalyzerMessageFormat
AL00XXAnalyzerDescription
```

Adopted in: AL0020, AL0024, AL0026, AL0030, AL0105, AL0106. (Re-grep `new TypeCache<` under `src/ANcpLua.Analyzers/Analyzers/` if this list looks suspect — analyzers come and go faster than this prose.)
`AnalyzerReleases.Unshipped.md` gets one row per diagnostic under `### New Rules`:

```text
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
AL00XX | Usage | Warning | Al00xxDescriptiveNameAnalyzer

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Nitpick: Update diagnostic ID wildcards, class names, and template strings in AGENTS.md (e.g., lines 38, 55, 78, 124, 245) from the legacy AL0XXX/Al00xx range to the new AL1XXX/Al1XXX range to ensure consistency with the 2.0.0 renumbering scheme.

@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

Threads marked needs-human stay unresolved and block auto-merge.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Diagnostic rule identifiers reorganized: All rule IDs migrated from AL0xxx format to new domain-banded ranges (AL1000–AL1899). Users must update .editorconfig files, #pragma suppress directives, and analyzer configuration to reference new IDs. Migration mapping available in documentation.
  • Version Update

    • Package version bumped to 2.0.0.
  • Documentation

    • Updated repository guides with new rule ID assignments and domain-band organization (correctness, ASP.NET Core, async/threading, AOT safety, version management, style, tool governance).

Walkthrough

Global renumbering: analyzers, code fixes, resources, docs, tests, and configs migrated from AL0xxx to AL1xxx bands; README/AGENTS rewritten; .editorconfig severities updated; docs generator retargeted; package/version props bumped; changelog added for 2.0.0.

Changes

Analyzer ID Renumbering to AL1xxx bands

Layer / File(s) Summary
Core renumbering and resources/docs
src/ANcpLua.Analyzers/Analyzers/*, src/ANcpLua.Analyzers.CodeFixes/*, src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.*, README.md, AGENTS.md, CHANGELOG.md, eng/analyzer-renumber-plan.md
Renames diagnostic IDs, classes, and resource keys across analyzers and code fix providers from legacy AL0xxx to scoped AL1xxx ranges; rewrites README and AGENTS to reflect new domains; updates code fix title resource keys; adds detailed breaking change and migration info in CHANGELOG and planning document.
Severity and tooling config adjustments
.editorconfig, Directory.Build.props, Version.props, Directory.Packages.props, src/ANcpLua.Analyzers.AnalyzerDocs/*, and selected config/comments
Updates analyzer severity settings in dogfood and test projects for new IDs; adjusts suppression lists in project files; updates XML documentation comments and code references to new IDs; bumps build and package version to 2.0.0; aligns AOT diagnostic comments; removes deprecated CLAUDE.md file.
Tests migration and adjustment to new IDs
tests/ANcpLua.Analyzers.Tests/*
Renames all test classes and generic analyzer/code-fix parameters from AL0xxx-based to AL1xxx-based IDs; updates inline diagnostic markers in source test files; updates code fix tests to use new code fix provider types; preserves existing test cases and assertions.
Refactorings and specific code fix updates
src/ANcpLua.Analyzers.CodeFixes/Refactorings/*, src/ANcpLua.Analyzers.CodeFixes/CodeFixes/*
Adjusts refactoring eligibility checks and pragma suppressions to new analyzer IDs; renames and rewires numerous code fix providers to new AL1xxx diagnostic IDs; updates FixAll provider references; updates code action titles and equivalence keys without changing fix logic.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 46

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs/analyzer-confidence-audit-2026-05-23.md (1)

1-73: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify temporal intent: frozen audit vs living analysis.

This audit was dated 2026-05-23, but now references the post-renumber AL1xxx IDs. If this is a historical snapshot taken before the renumber, the ID updates create a contradiction—the audit would be claiming it analyzed AL1703 in May when that ID didn't exist yet. If it's a living document maintained post-renumber, it needs a header note stating "Updated after 2.0.0 renumber; original audit used AL0xxx IDs—see eng/analyzer-renumber-plan.md for mapping."

Recommendation: Add a header block after line 1 clarifying whether this is a frozen historical record (in which case, revert to AL0xxx IDs and add a footer mapping to AL1xxx) or a living doc (in which case, add a note that it was updated post-renumber).

🤖 Prompt for 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.

In `@docs/analyzer-confidence-audit-2026-05-23.md` around lines 1 - 73, The
document titled "Analyzer Confidence Audit - 2026-05-23" currently mixes pre-
and post-renumber rule IDs (e.g., AL0140 vs AL1703) without stating whether this
is a frozen historical snapshot or a living, updated audit; add a brief header
paragraph under the main title that explicitly states which mode this file
represents (either "Frozen: original audit using AL0xxx IDs — see
eng/analyzer-renumber-plan.md for AL1xxx mappings" and revert displayed IDs to
AL0xxx, or "Living: updated after 2.0.0 renumber; IDs are AL1xxx — original
AL0xxx IDs mapped in eng/analyzer-renumber-plan.md"), and ensure the header
references the document name and the example rules AL0140/AL1703 so readers can
immediately see the mapping intent.
eng/analyzer-renumber-plan.md (1)

481-489: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Flag this plan as frozen historical record post-merge.

Once the renumber PR merges, this 488-line plan becomes a historical artifact. Add a header note after line 1 (or in a follow-up commit) stating:

> **Status:** Historical planning artifact. The renumber shipped in v2.0.0 on [date]. For the current AL1xxx rule catalog, see README.md. For the authoritative old→new mapping, see this file's section 2.

This prevents future readers from treating the "Files to touch" checklist as current action items.

🤖 Prompt for 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.

In `@eng/analyzer-renumber-plan.md` around lines 481 - 489, Add a clear "Status:
Historical planning artifact" header to the top of eng/analyzer-renumber-plan.md
indicating the renumber shipped in v2.0.0 (with date placeholder) and directing
readers to README.md for the current AL1xxx catalog and to this file's section 2
for the authoritative old→new mapping; update the file header (immediately after
the first line) to include that one-line note so future readers don't treat the
488-line checklist as actionable.
src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs (1)

24-27: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey must use the analyzer's DiagnosticId for FixAll support.

Line 27 sets equivalenceKey to UseImplicitTypeTitle (a const string). Per coding guidelines, the equivalenceKey must be set to the analyzer's DiagnosticId.

Proposed fix
         CodeAction.Create(
             UseImplicitTypeTitle,
             _ => UseImplicitType(document, root, syntax),
-            UseImplicitTypeTitle);
+            Al1703UseImplicitTypeWhenApparentAnalyzer.DiagnosticId);

As per coding guidelines: CreateCodeAction method must set equivalenceKey to the analyzer's DiagnosticId to enable FixAll support

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs`
around lines 24 - 27, The CodeAction created in CodeAction.Create currently uses
UseImplicitTypeTitle as the equivalenceKey which prevents FixAll from working;
change the equivalenceKey to the analyzer's DiagnosticId (use the DiagnosticId
constant/field from this analyzer) while keeping the title and callback the same
— update the CodeAction.Create call that references UseImplicitTypeTitle to pass
the analyzer DiagnosticId as the third argument and ensure any helper
CreateCodeAction wrappers follow the same pattern; leave the
UseImplicitType(document, root, syntax) invocation and UseImplicitTypeTitle
unchanged for UI text.
♻️ Duplicate comments (2)
CHANGELOG.md (1)

11-11: 🧹 Nitpick | 🔵 Trivial

HelpLink URL redirect strategy is a docs-site deployment concern, not a CHANGELOG issue.

The past review comment flagging redirect strategy for old AL0xxx URL paths is valid as operational advice, but implementing redirects is outside the scope of this repo's CHANGELOG. The changelog correctly documents the URL format change; ensure the Mintlify docs site deployment includes a redirect map (e.g., AL0001AL1000) before publishing 2.0.0.

🤖 Prompt for 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.

In `@CHANGELOG.md` at line 11, Remove operational redirect guidance from
CHANGELOG.md and keep only the factual note that help-link URLs now use the new
IDs (e.g., AL1000); relocate the redirect/implementation instruction about
mapping old AL0xxx → AL1000 to deployment/ops documentation or the release
checklist so the changelog remains a user-facing record and not an operational
task.
AGENTS.md (1)

38-44: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Update template placeholders from AL0XXX to AL1XXX range.

Template examples and wildcards still use the legacy AL0XXX/AL00XX range (e.g., lines 38, 41, 44, 55–56, 78–79, 88, 124–126, 134, 245, 249, 276–277), but the 2.0.0 renumber reserves AL0xxx for sibling packages and moves this repo's rules to AL1xxx bands. Update placeholders to use the new range (e.g., AL1XXX*.cs, Al1xxxDescriptiveNameAnalyzer, "AL1XXX") to avoid confusion.

Proposed template updates
-  Analyzers/AL0XXX*.cs
+  Analyzers/AL1XXX*.cs
-  CodeFixes/AL0XXX*.cs
+  CodeFixes/AL1XXX*.cs
-  AL0XXX*Tests.cs
+  AL1XXX*Tests.cs
-public sealed partial class Al00xxDescriptiveNameAnalyzer : AlAnalyzer {
-    private const string DiagnosticId = "AL00XX";
+public sealed partial class Al1xxxDescriptiveNameAnalyzer : AlAnalyzer {
+    private const string DiagnosticId = "AL1XXX";
-| File | `Analyzers/AL00XXDescriptiveNameAnalyzer.cs` |
-| Class | `Al00xxDescriptiveNameAnalyzer`; use `Al`, not `AL` |
+| File | `Analyzers/AL1XXXDescriptiveNameAnalyzer.cs` |
+| Class | `Al1xxxDescriptiveNameAnalyzer`; use `Al`, not `AL` |
-AL00XXAnalyzerTitle
-AL00XXAnalyzerMessageFormat
-AL00XXAnalyzerDescription
+AL1XXXAnalyzerTitle
+AL1XXXAnalyzerMessageFormat
+AL1XXXAnalyzerDescription
-AL00XX | Usage | Warning | Al00xxDescriptiveNameAnalyzer
+AL1XXX | Usage | Warning | Al1xxxDescriptiveNameAnalyzer
-using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<ANcpLua.Analyzers.Analyzers.Al00xxDescriptiveNameAnalyzer>;
+using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<ANcpLua.Analyzers.Analyzers.Al1xxxDescriptiveNameAnalyzer>;
-public sealed partial class Al00xxDescriptiveNameTests : AnalyzerTestBase {
+public sealed partial class Al1xxxDescriptiveNameTests : AnalyzerTestBase {
-| File | `tests/ANcpLua.Analyzers.Tests/AL00XXDescriptiveNameTests.cs` |
-| Class | `Al00xxDescriptiveNameTests` |
+| File | `tests/ANcpLua.Analyzers.Tests/AL1XXXDescriptiveNameTests.cs` |
+| Class | `Al1xxxDescriptiveNameTests` |

Also applies to: 55-56, 78-79, 88-88, 124-126, 134-134, 245-245, 249-249, 276-277

🤖 Prompt for 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.

In `@AGENTS.md` around lines 38 - 44, Update every template placeholder and
wildcard that currently uses the AL0XXX/AL00XX range to the AL1XXX/AL1xxx range:
replace patterns like "AL0XXX*.cs", "AL00XX", analyzer class names such as
"Al0xxxDescriptiveNameAnalyzer" and string IDs like "AL0XXX" with their AL1XXX
equivalents (e.g., "AL1XXX*.cs", "Al1xxxDescriptiveNameAnalyzer", "AL1XXX").
Apply this change across all mentioned locations (lines referenced in the
comment) including files/lists under Analyzers, CodeFixes, Refactorings, tests,
and any template examples so the repo uses the AL1xxx numbering consistently.
Ensure casing is preserved where appropriate (e.g., class names) and update any
quoted IDs in templates/documentation to the AL1XXX form.
🤖 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 @.editorconfig:
- Around line 1736-1743: The editorconfig contains a dead scoped suppression
block for Semconv files: locate the section with the header
"[src/ANcpLua.Analyzers/Semconv/*.cs]" and the setting
"dotnet_diagnostic.AL1210.severity = none" and either remove this entire scoped
block and its surrounding comment or change the glob to the actual Semconv
catalog path (or a broader pattern) so the AL1210 suppression applies where the
Semconv .cs files actually live; ensure the change keeps the comment/context
consistent with other .editorconfig entries.

In `@eng/analyzer-renumber-plan.md`:
- Around line 435-448: Update Section 8 of eng/analyzer-renumber-plan.md to
explicitly pick a release strategy and warn about the config-gap: state whether
you will (A) publish ANcpLua.Analyzers 2.0.0, then update
ANcpLua.NET.Sdk/src/Config/Analyzer.ANcpLua.Analyzers.editorconfig and bump the
ANcpLuaAnalyzersVersion in the SDK and publish the SDK (and include an explicit
warning to consumers about the transient broken dotnet_diagnostic.AL####
severities), or (B) perform a coordinated simultaneous release of
ANcpLua.Analyzers and ANcpLua.NET.Sdk with lockstep pins to avoid the gap;
include the chosen path, the exact steps (publish analyzers → update SDK
editorconfig → bump ANcpLuaAnalyzersVersion → publish SDK, or coordinated
publish), and a short consumer-facing warning text about the config-gap window
if option A is chosen.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs`:
- Around line 20-23: In AL1001SimplifyNegatedPatternCodeFixProvider, the
CodeAction.Create call currently uses
nameof(CodeFixResources.AL1001CodeFixTitle) as the equivalenceKey which prevents
stable FixAll grouping; update that third argument to use
Al1001DontRepeatNegatedPatternAnalyzer.DiagnosticId instead so all fixes for
this diagnostic share the same equivalence key (locate the
CodeAction.Create(...) call that returns a CodeAction and the
RemoveRepeatedNegatedPatterns(...) delegate and replace the equivalenceKey
accordingly).

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1003SpanPatternMatchingCodeFixProvider.cs`:
- Around line 16-19: The CodeAction.Create call is using
nameof(CodeFixResources.AL1003CodeFixTitle) as the equivalenceKey; change it to
use the analyzer diagnostic ID instead (e.g., use diagnostic.Id or the
analyzer's DiagnosticId constant such as AL1003Analyzer.DiagnosticId) so FixAll
works correctly; keep the title and the UsePatternMatching(document, syntax,
root) callback the same and only replace the equivalenceKey argument.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs`:
- Around line 16-19: The CodeAction created in
AL1004UseSequenceEqualCodeFixProvider.cs currently uses
nameof(CodeFixResources.AL1004CodeFixTitle) as the equivalenceKey; change that
third parameter in the CodeAction.Create call to use the analyzer's public
diagnostic id Al1003ToAL1004SpanComparisonAnalyzer.DiagnosticIdAl1004 (i.e.
"AL1004") so FixAll groups correctly, referencing the CodeAction.Create
invocation and the Al1003ToAL1004SpanComparisonAnalyzer.DiagnosticIdAl1004
symbol.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs`:
- Around line 54-57: The CodeAction in AL1007IXmlSerializableCodeFixProvider is
using nameof(CodeFixResources.AL1007CodeFixTitle) as the equivalenceKey which
breaks FixAll; update the CodeAction.Create call to use the analyzer diagnostic
ID (DiagnosticIdAl1007) as the equivalenceKey instead so FixAll targets only
AL1007, i.e., replace the third argument in the CodeAction.Create invocation
with the DiagnosticIdAl1007 symbol (or the constant defined in the corresponding
analyzer) while keeping the title and the FixAsync(context.Document, target,
root) callback unchanged.
- Line 10: The class currently inherits directly from CodeFixProvider; change
its declaration to inherit from
AlCodeFixProvider<Al1007IXmlSerializableCodeFixProvider> (i.e., replace
"CodeFixProvider" with
"AlCodeFixProvider<Al1007IXmlSerializableCodeFixProvider>") and decorate the
class with [ExportCodeFixProvider(LanguageNames.CSharp)] and [Shared]
attributes; also add any missing using directives for
Microsoft.CodeAnalysis.CodeFixes and System.Composition so the attributes and
base type resolve. Ensure all existing overrides match the AlCodeFixProvider<T>
contract (adjust signatures if the base generic requires them).

In `@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1009LockTypeCodeFixProvider.cs`:
- Around line 44-47: The CodeAction Create call currently sets equivalenceKey to
nameof(CodeFixResources.AL1009CodeFixTitle) which breaks FixAll identity; change
the equivalenceKey argument in the CodeAction.Create invocation that constructs
the fix for ChangeFieldTypeToLockAsync (the CodeAction created with
CodeFixResources.AL1009CodeFixTitle) to use
Al1009LockKeywordAnalyzer.DiagnosticId instead so the fix’s equivalence key
equals the analyzer DiagnosticId.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1010PatternMatchingCodeFixProvider.cs`:
- Around line 18-21: Replace the hardcoded CodeAction title and equivalenceKey
in AL1010PatternMatchingCodeFixProvider with the repo convention: use the
resource-backed title from CodeFixResources (the entry that corresponds to
AL1010) as the first argument to CodeAction.Create, and use the analyzer
DiagnosticId for the equivalenceKey (not
nameof(Al1010PatternMatchingCodeFixProvider)); update the existing
CodeAction.Create call that wraps ConvertToPatternMatching(document, binary,
root) so its title references the appropriate CodeFixResources constant and its
equivalenceKey is the AL1010 analyzer DiagnosticId.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1011NormalizeNullGuardStyleCodeFixProvider.cs`:
- Around line 34-37: The code action currently uses
nameof(Al1011NormalizeNullGuardStyleCodeFixProvider) as the equivalenceKey which
breaks FixAll; change the equivalenceKey passed to CodeAction.Create to the
analyzer's DiagnosticId (e.g., use the DiagnosticId constant or descriptor.Id
for AL1011) instead of the provider type name so the Create call uses the
analyzer DiagnosticId as the equivalence key; update the CodeAction.Create
invocation in AL1011NormalizeNullGuardStyleCodeFixProvider to pass the
DiagnosticId value.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs`:
- Around line 35-38: The CodeAction equivalenceKey is currently set to
nameof(Al1012CombineDeclarationWithNullCheckCodeFixProvider) which prevents
FixAll from working; change the third argument in the CodeAction.Create call to
the analyzer's DiagnosticId (for example use Al1012Analyzer.DiagnosticId or the
constant that holds "AL1012") so the equivalenceKey equals the analyzer ID; keep
the rest of the CodeAction.Create call (title and ct lambda invoking
CombineAsync) unchanged.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1200UseIsEqualToCodeFixProvider.cs`:
- Around line 21-24: The CodeAction.Create call in
Al1200UseIsEqualToCodeFixProvider currently uses
nameof(Al1200UseIsEqualToCodeFixProvider) as the equivalence key which breaks
FixAll grouping; update that CodeAction.Create invocation to pass
Al1200UseIsEqualToAnalyzer.DiagnosticId as the equivalenceKey instead (keep the
title and the callback to ConvertToIsEqualTo(document, invocation, root)
unchanged) so FixAll uses the analyzer's DiagnosticId for grouping.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1201UseHasAttributeCodeFixProvider.cs`:
- Around line 32-35: The CodeAction.Create call currently uses
nameof(Al1201UseHasAttributeCodeFixProvider) as the equivalenceKey which breaks
FixAll; change the equivalenceKey to the analyzer's DiagnosticId (e.g., use the
AL1201 analyzer's DiagnosticId constant/property) when creating the CodeAction
for ConvertToHasAttribute so the equivalence key equals the analyzer
DiagnosticId (AL1201) instead of the codefix type name.
- Around line 14-15: The class Al1201UseHasAttributeCodeFixProvider currently
inherits from CodeFixProvider; change it to inherit from the repo base
AlCodeFixProvider<TNode> with the appropriate syntax node type used by this
analyzer (replace CodeFixProvider with AlCodeFixProvider<TNode> using the
analyzer's node type), and add the required attributes
[ExportCodeFixProvider(LanguageNames.CSharp)] and [Shared] to the class
declaration so it follows the project's code-fix contract.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs`:
- Around line 15-16: The class Al1202UseTypeHierarchyCodeFixProvider currently
inherits directly from CodeFixProvider; change it to inherit from
AlCodeFixProvider<Al1202UseTypeHierarchyCodeFixProvider> and apply the
[ExportCodeFixProvider(LanguageNames.CSharp)] and [Shared] attributes above the
class declaration so it matches the repository provider shape; ensure you
preserve existing members like FixableDiagnosticIds and any overrides required
by AlCodeFixProvider<T>.
- Around line 35-38: The CodeAction.Create calls (the one creating the
implements action that calls ConvertToImplements and the other corresponding
action on lines 45-48) currently use a provider-suffixed string for equivalence
keys which breaks FixAll; change their equivalenceKey arguments to the analyzer
diagnostic id (AL1202) instead of nameof(Al1202UseTypeHierarchyCodeFixProvider)
+ "_Implements" (and the similar suffix used for the other action). Use the
constant/diagnostic id (e.g., DiagnosticIds.AL1202 or context.Diagnostics[0].Id)
as the equivalenceKey when constructing the CodeAction so FixAll will work,
leaving the title and the delegate (ConvertToImplements / the other conversion
method) unchanged.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1203UseOperationExtensionsCodeFixProvider.cs`:
- Around line 31-34: The CodeAction.Create calls in
Al1203UseOperationExtensionsCodeFixProvider currently use provider-name-derived
equivalence keys (e.g., nameof(Al1203UseOperationExtensionsCodeFixProvider) +
"_IsMethodNamed"); change both CodeAction.Create invocations (the one that calls
ConvertToIsMethodNamed and the other that calls ConvertToIsOperationNamed) to
use Al1203UseOperationExtensionsAnalyzer.DiagnosticId as the equivalenceKey so
FixAll works correctly.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1204UseOrEmptyCodeFixProvider.cs`:
- Around line 28-31: The CodeAction created in
AL1204UseOrEmptyCodeFixProvider.cs currently uses
nameof(Al1204UseOrEmptyCodeFixProvider) as the equivalence key; change the
CodeAction.Create call that wraps ConvertToOrEmpty(document, coalesce, root) so
its equivalenceKey is Al1204UseOrEmptyAnalyzer.DiagnosticId instead (i.e., pass
Al1204UseOrEmptyAnalyzer.DiagnosticId as the third argument) to enable proper
FixAll behavior and keep ConvertToOrEmpty and the surrounding method intact.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1205UseToImmutableArrayOrEmptyCodeFixProvider.cs`:
- Around line 25-28: The CodeAction.Create call in
Al1205UseToImmutableArrayOrEmptyCodeFixProvider is using
nameof(Al1205UseToImmutableArrayOrEmptyCodeFixProvider) as the equivalence key;
change that last argument to
Al1205UseToImmutableArrayOrEmptyAnalyzer.DiagnosticId so the created CodeAction
uses the analyzer's DiagnosticId for equivalence (leave the title and the
delegate to ConvertToExtension(document, coalesce, root) unchanged).

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1206UseWhereNotNullCodeFixProvider.cs`:
- Around line 27-30: The CodeAction created in
Al1206UseWhereNotNullCodeFixProvider currently uses
nameof(Al1206UseWhereNotNullCodeFixProvider) as the equivalenceKey; change that
third argument to Al1206UseWhereNotNullAnalyzer.DiagnosticId so the
CodeAction.Create call (the same call that wraps ConvertToWhereNotNull) uses the
analyzer's DiagnosticId as the equivalenceKey to enable correct FixAll grouping.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1207UseToDisplayStringExtensionsCodeFixProvider.cs`:
- Around line 39-42: The CodeAction.Create call in
AL1207UseToDisplayStringExtensionsCodeFixProvider is using
nameof(Al1207UseToDisplayStringExtensionsCodeFixProvider) as the equivalenceKey;
change it to use the analyzer's DiagnosticId
(Al1207UseToDisplayStringExtensionsAnalyzer.DiagnosticId) so FixAll works
correctly. Locate the CodeAction.Create invocation (the call that passes
CodeFixResources.AL1207CodeFixTitle and the ConvertToExtension lambda) and
replace the equivalenceKey argument with
Al1207UseToDisplayStringExtensionsAnalyzer.DiagnosticId.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1208UseGuardNotNullCodeFixProvider.cs`:
- Around line 27-30: The CodeAction call uses
nameof(Al1208UseGuardNotNullCodeFixProvider) as the equivalenceKey which breaks
FixAll; change the equivalenceKey argument in the CodeAction.Create invocation
(the call that passes CodeFixResources.AL1208CodeFixTitle and _ =>
ConvertToGuardNotNull(document, coalesce, root)) to use
Al1208UseGuardNotNullAnalyzer.DiagnosticId instead of
nameof(Al1208UseGuardNotNullCodeFixProvider) so the action’s equivalenceKey
matches the analyzer diagnostic ID and enables FixAll correctness.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1209UseTryParseExtensionsCodeFixProvider.cs`:
- Around line 27-30: The CodeAction.Create call currently uses
nameof(Al1209UseTryParseExtensionsCodeFixProvider) as the equivalenceKey; change
it to use Al1209UseTryParseExtensionsAnalyzer.DiagnosticId instead so FixAll
works correctly — update the CodeAction.Create invocation that passes
AL1209CodeFixTitle and the ConvertToExtension callback to set the third argument
to Al1209UseTryParseExtensionsAnalyzer.DiagnosticId (leave the title and
callback unchanged).

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1210UseStringComparisonExtensionsCodeFixProvider.cs`:
- Around line 39-42: The CodeAction.Create call currently uses
nameof(Al1210UseStringComparisonExtensionsCodeFixProvider) as the
equivalenceKey; change it to use
Al1210UseStringComparisonExtensionsAnalyzer.DiagnosticId instead so FixAll works
correctly—update the call that constructs the CodeAction (the one passing
CodeFixResources.AL1210CodeFixTitle and the lambda that calls
ConvertToExtensionMethod(document, invocation, root)) to set equivalenceKey to
Al1210UseStringComparisonExtensionsAnalyzer.DiagnosticId rather than the
provider name.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1211UseAttributeExtensionsCodeFixProvider.cs`:
- Around line 33-36: The CodeAction created in
Al1211UseAttributeExtensionsCodeFixProvider currently uses
nameof(Al1211UseAttributeExtensionsCodeFixProvider) as the equivalenceKey;
change it to use Al1211UseAttributeExtensionsAnalyzer.DiagnosticId instead so
FixAll works correctly. Locate the CodeAction.Create call (and related
overloads) around where ConvertToGetConstructorArgument(...) is passed and
replace the equivalenceKey argument with
Al1211UseAttributeExtensionsAnalyzer.DiagnosticId, ensuring the symbol is
referenced/imported if necessary.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1212UseGuardNotNullOrEmptyCodeFixProvider.cs`:
- Around line 33-36: The CodeAction created in the CodeAction.Create call
currently uses nameof(Al1212UseGuardNotNullOrEmptyCodeFixProvider) as the
equivalenceKey; change it to use
Al1212UseGuardNotNullOrEmptyAnalyzer.DiagnosticId instead so FixAll works
correctly — update the CodeAction.Create invocation that supplies
AL1212CodeFixTitle and the ConvertToGuardNotNullOrEmpty(document, ifStatement,
root) delegate to pass Al1212UseGuardNotNullOrEmptyAnalyzer.DiagnosticId as the
equivalenceKey.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1213UseGuardNotNullOrWhiteSpaceCodeFixProvider.cs`:
- Around line 27-30: The CodeAction is created with the provider name as the
equivalenceKey which breaks FixAll; change the equivalenceKey argument in the
CodeAction.Create call (the call that uses AL1213CodeFixTitle and
ConvertToGuardNotNullOrWhiteSpace) from
nameof(Al1213UseGuardNotNullOrWhiteSpaceCodeFixProvider) to
Al1213UseGuardNotNullOrWhiteSpaceAnalyzer.DiagnosticId so the action uses the
analyzer's DiagnosticId for correct FixAll behavior.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1214UseGuardNotZeroCodeFixProvider.cs`:
- Around line 37-39: The FixAll equivalence key is currently set to
nameof(Al1214UseGuardNotZeroCodeFixProvider) which can break FixAll bucketing;
update the RegisterCodeFix call in Al1214UseGuardNotZeroCodeFixProvider to use
Al1214UseGuardNotZeroAnalyzer.DiagnosticId as the equivalenceKey instead of
nameof(Al1214UseGuardNotZeroCodeFixProvider) so FixAll uses the analyzer
diagnostic id for consistent grouping.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1215UseGuardNotNegativeCodeFixProvider.cs`:
- Around line 28-30: The RegisterCodeFix call in
Al1215UseGuardNotNegativeCodeFixProvider currently uses
nameof(Al1215UseGuardNotNegativeCodeFixProvider) as the equivalenceKey; change
that argument to Al1215UseGuardNotNegativeAnalyzer.DiagnosticId so the
equivalenceKey matches the analyzer ID (keep the other args the same, i.e.,
CodeFixResources.AL1215CodeFixTitle and the _ =>
ConvertToGuardNotNegative(document, ifStatement, root) delegate).

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1216UseGuardPositiveCodeFixProvider.cs`:
- Around line 30-32: The FixAll equivalence key is currently set to the provider
name via nameof(Al1216UseGuardPositiveCodeFixProvider); update the third
argument of the RegisterCodeFix call to use the analyzer diagnostic ID by
replacing the equivalenceKey with Al1216UseGuardPositiveAnalyzer.DiagnosticId so
FixAll uses the analyzer's DiagnosticId; locate the RegisterCodeFix invocation
in AL1216UseGuardPositiveCodeFixProvider and change the equivalenceKey
accordingly.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1217UseGuardNotEmptyGuidCodeFixProvider.cs`:
- Around line 34-36: The equivalenceKey passed to RegisterCodeFix is currently
the code fix provider class name; change it to use the analyzer DiagnosticId
instead: replace the nameof(Al1217UseGuardNotEmptyGuidCodeFixProvider)
equivalenceKey with Al1217UseGuardNotEmptyGuidAnalyzer.DiagnosticId so the
FixAll operation keys correctly for the ConvertToGuardNotEmpty code action
registered in Al1217UseGuardNotEmptyGuidCodeFixProvider.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1218UseGuardDefinedEnumCodeFixProvider.cs`:
- Around line 28-30: The equivalenceKey currently uses
nameof(Al1218UseGuardDefinedEnumCodeFixProvider) which breaks FixAll; change the
equivalenceKey to the analyzer diagnostic id by replacing the third argument
from nameof(Al1218UseGuardDefinedEnumCodeFixProvider) to
Al1218UseGuardDefinedEnumAnalyzer.DiagnosticId in the CodeAction.Create call
that invokes ConvertToGuardDefinedEnum(document, ifStatement, root) inside
Al1218UseGuardDefinedEnumCodeFixProvider so FixAll groups diagnostics by the
analyzer ID rather than the provider name.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1220UseGuardForThrowIfCodeFixProvider.cs`:
- Around line 34-36: The FixAll equivalence key is incorrectly set to the
provider name; update the registration call in
AL1220UseGuardForThrowIfCodeFixProvider (the RegisterCodeFix invocation that
currently uses nameof(Al1220UseGuardForThrowIfCodeFixProvider)) to use
Al1220UseGuardForThrowIfAnalyzer.DiagnosticId as the equivalenceKey instead so
the fix is keyed by the analyzer DiagnosticId; keep the title
(CodeFixResources.AL1220CodeFixTitle) and callback (ConvertToGuard) the same.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1313CancellationTokenPropagationCodeFixProvider.cs`:
- Around line 23-25: The CodeAction in
AL1313CancellationTokenPropagationCodeFixProvider is using
CodeFixResources.AL1313CodeFixTitle as the equivalenceKey when creating the fix;
change the equivalenceKey to the analyzer ID by passing
Al1313CancellationTokenPropagationAnalyzer.DiagnosticId instead (update the
CodeAction creation that calls AddCancellationTokenAsync/document
invocation/root to use Al1313CancellationTokenPropagationAnalyzer.DiagnosticId
as the third argument).

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1314UseExplicitMidpointRoundingCodeFixProvider.cs`:
- Around line 30-32: The code action's equivalenceKey is currently set using
nameof(Al1314UseExplicitMidpointRoundingCodeFixProvider); change it to use
Al1314UseExplicitMidpointRoundingAnalyzer.DiagnosticId so the equivalenceKey
aligns with the analyzer ID for FixAll support—update the invocation that
registers the code action (the call passing CodeFixResources.AL1314CodeFixTitle,
_ => AppendMidpointRounding(document, invocation, root), nameof(...)) to replace
the nameof(...) argument with
Al1314UseExplicitMidpointRoundingAnalyzer.DiagnosticId.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs`:
- Around line 28-39: The CodeAction.Create calls that build fixes for
SwitchExpressionSyntax and SwitchStatementSyntax currently set equivalenceKey to
nameof(CodeFixResources.AL1500CodeFixTitle); change both equivalenceKey values
to the analyzer's DiagnosticId string so FixAll groups correctly (use the ID
constant your analyzer exposes, e.g., DiagnosticIds.AL1500 or
AL1500Analyzer.DiagnosticId) in the two CodeAction.Create invocations that call
FixSwitchExpression and FixSwitchStatement and keep the rest of the signature
the same.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs`:
- Around line 32-38: The CodeAction created in context.RegisterCodeFix uses
nameof(CodeFixResources.AL1503CodeFixTitle) as the equivalenceKey; change the
third argument of CodeAction.Create in the RegisterCodeFix call so the
equivalenceKey is the analyzer diagnostic id (use diagnostic.Id) instead of the
resource name to enable correct FixAll grouping for the AL1503 fix handled by
RemoveNormalizeWhitespaceAsync.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1504DuckDbTableCodeFixProvider.cs`:
- Around line 28-34: The CodeAction equivalenceKey is currently set to
nameof(CodeFixResources.AL1504CodeFixTitle); change it to use the analyzer
diagnostic id so FixAll works: when creating the CodeAction in
context.RegisterCodeFix (the CodeAction.Create call that invokes
MakePartialAsync and uses CodeFixResources.AL1504CodeFixTitle), set the
equivalenceKey to the Diagnostic.Id (e.g., diagnostic.Id or the analyzer's
DiagnosticId constant) instead of the resource name.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1700StaticLambdaCodeFixProvider.cs`:
- Around line 22-27: The CodeAction registered in
AL1700StaticLambdaCodeFixProvider (context.RegisterCodeFix -> CodeAction.Create)
uses CodeFixResources.AL1700CodeFixTitle as the equivalenceKey; change it to the
analyzer diagnostic id so FixAll works: when creating the CodeAction for
MakeStaticAsync, pass the diagnostic's DiagnosticId (e.g., diagnostic.Id) as the
equivalenceKey instead of nameof(CodeFixResources.AL1700CodeFixTitle) so the
action's equivalenceKey matches the analyzer DiagnosticId.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1701DateTimeNowCodeFixProvider.cs`:
- Around line 22-25: The CodeAction.Create call in
AL1701DateTimeNowCodeFixProvider currently sets the equivalenceKey to the
provider class name; change it to use the analyzer's DiagnosticId to enable
FixAll support by replacing the current equivalenceKey
(nameof(Al1701DateTimeNowCodeFixProvider)) with the diagnostic's ID (e.g.,
diagnostic.Id or the analyzer's DiagnosticId constant such as
Al1701Analyzer.DiagnosticId) in the CodeAction.Create invocation that constructs
the fix for ConvertToTimeProvider.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1702UseSystemTextJsonCodeFixProvider.cs`:
- Around line 31-37: The CodeAction equivalenceKey is currently set to the
provider class name (nameof(Al1702UseSystemTextJsonCodeFixProvider)), which
breaks FixAll; change the equivalenceKey passed to CodeAction.Create to the
analyzer's DiagnosticId (use the Diagnostic.Id from the diagnostic parameter or
the analyzer constant) so the CodeAction's equivalenceKey matches the analyzer's
DiagnosticId and enables FixAll support—update the call in the RegisterCodeFix
block where CodeAction.Create is invoked (the invocation that builds the
CodeAction for ConvertToSystemTextJson) to supply diagnostic.Id instead of the
provider class name.

In `@src/ANcpLua.Analyzers/AnalyzerReleases.Unshipped.md`:
- Around line 8-96: The release table adds many AL0xxx ID changes (see
AnalyzerReleases.Unshipped.md and the AL0xxx entries) and downstream consumers
that rely on .editorconfig/NoWarn/test ID assertions will break unless migration
is coordinated; before publishing 2.0.0, gate the rollout: prepare and publish
the SDK-packaged analyzer .editorconfig/update that maps old->new IDs first,
communicate migration steps and timelines to dependent repos, and only then
publish the analyzer package and announce the change so downstream repos can
update NoWarn/test expectations in lockstep.

In `@tests/ANcpLua.Analyzers.Tests/AL1210UseStringComparisonExtensionsTests.cs`:
- Around line 103-104: Rename the test class Al1210CodeFixTests to match the
analyzer name and team convention: Al1210UseStringComparisonExtensionsTests.
Update the class declaration (the class identifier) so the class remains sealed
partial and continues to inherit from
CodeFixTest<Al1210UseStringComparisonExtensionsAnalyzer,
Al1210UseStringComparisonExtensionsCodeFixProvider>, and update any
references/usages of Al1210CodeFixTests in the test project (e.g., test runners
or other test helpers) to the new Al1210UseStringComparisonExtensionsTests
identifier.

In `@tests/ANcpLua.Analyzers.Tests/AL1220UseGuardForThrowIfTests.cs`:
- Line 11: Replace the direct inheritance from
AnalyzerTest<Al1220UseGuardForThrowIfAnalyzer> in the
Al1220UseGuardForThrowIfTests class with the local AnalyzerTestBase alias so the
class declares inheritance as
AnalyzerTestBase<Al1220UseGuardForThrowIfAnalyzer>; locate the class declaration
line containing "class Al1220UseGuardForThrowIfTests" and update the base type
accordingly (ensure the project has the AnalyzerTestBase alias
imported/defined).

In `@tests/ANcpLua.Analyzers.Tests/AL1300ToAL1303ThreadingTests.cs`:
- Line 9: Replace direct inheritance from
AnalyzerTest<Al1300ToAl1303ThreadingAnalyzer> with the standardized
AnalyzerTestBase alias by changing the class declaration to inherit from
AnalyzerTestBase<Al1300ToAl1303ThreadingAnalyzer>, and add a file-level using
alias declaration near the top of the file: define AnalyzerTestBase as an alias
for AnalyzerTest so the tests at symbols Al1300AnalyzerTests (and the other
three test classes at the referenced locations) use AnalyzerTestBase<TAnalyzer>
instead of AnalyzerTest<TAnalyzer>.

In `@Version.props`:
- Line 61: Update the pinned analyzer version variable ANcpLuaAnalyzersVersion
in Version.props from 1.29.4 to 2.0.0 after the new 2.0.0 package is published;
then make matching updates in the other repositories that reference this same
variable (ANcpLua.NET.Sdk, ErrorOrX, ANcpLua.Agents) so they pull the renumbered
diagnostics in lockstep, and add or update CI/scripted steps (or documentation)
to enforce the publish-first then bump sequence to avoid restore failures.

---

Outside diff comments:
In `@docs/analyzer-confidence-audit-2026-05-23.md`:
- Around line 1-73: The document titled "Analyzer Confidence Audit - 2026-05-23"
currently mixes pre- and post-renumber rule IDs (e.g., AL0140 vs AL1703) without
stating whether this is a frozen historical snapshot or a living, updated audit;
add a brief header paragraph under the main title that explicitly states which
mode this file represents (either "Frozen: original audit using AL0xxx IDs — see
eng/analyzer-renumber-plan.md for AL1xxx mappings" and revert displayed IDs to
AL0xxx, or "Living: updated after 2.0.0 renumber; IDs are AL1xxx — original
AL0xxx IDs mapped in eng/analyzer-renumber-plan.md"), and ensure the header
references the document name and the example rules AL0140/AL1703 so readers can
immediately see the mapping intent.

In `@eng/analyzer-renumber-plan.md`:
- Around line 481-489: Add a clear "Status: Historical planning artifact" header
to the top of eng/analyzer-renumber-plan.md indicating the renumber shipped in
v2.0.0 (with date placeholder) and directing readers to README.md for the
current AL1xxx catalog and to this file's section 2 for the authoritative
old→new mapping; update the file header (immediately after the first line) to
include that one-line note so future readers don't treat the 488-line checklist
as actionable.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs`:
- Around line 24-27: The CodeAction created in CodeAction.Create currently uses
UseImplicitTypeTitle as the equivalenceKey which prevents FixAll from working;
change the equivalenceKey to the analyzer's DiagnosticId (use the DiagnosticId
constant/field from this analyzer) while keeping the title and callback the same
— update the CodeAction.Create call that references UseImplicitTypeTitle to pass
the analyzer DiagnosticId as the third argument and ensure any helper
CreateCodeAction wrappers follow the same pattern; leave the
UseImplicitType(document, root, syntax) invocation and UseImplicitTypeTitle
unchanged for UI text.

---

Duplicate comments:
In `@AGENTS.md`:
- Around line 38-44: Update every template placeholder and wildcard that
currently uses the AL0XXX/AL00XX range to the AL1XXX/AL1xxx range: replace
patterns like "AL0XXX*.cs", "AL00XX", analyzer class names such as
"Al0xxxDescriptiveNameAnalyzer" and string IDs like "AL0XXX" with their AL1XXX
equivalents (e.g., "AL1XXX*.cs", "Al1xxxDescriptiveNameAnalyzer", "AL1XXX").
Apply this change across all mentioned locations (lines referenced in the
comment) including files/lists under Analyzers, CodeFixes, Refactorings, tests,
and any template examples so the repo uses the AL1xxx numbering consistently.
Ensure casing is preserved where appropriate (e.g., class names) and update any
quoted IDs in templates/documentation to the AL1XXX form.

In `@CHANGELOG.md`:
- Line 11: Remove operational redirect guidance from CHANGELOG.md and keep only
the factual note that help-link URLs now use the new IDs (e.g., AL1000);
relocate the redirect/implementation instruction about mapping old AL0xxx →
AL1000 to deployment/ops documentation or the release checklist so the changelog
remains a user-facing record and not an operational task.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7900c6da-3b61-40be-96c6-423395f6c23c

📥 Commits

Reviewing files that changed from the base of the PR and between 9d7393e and fcc2a2b.

📒 Files selected for processing (215)
  • .editorconfig
  • AGENTS.md
  • CHANGELOG.md
  • Directory.Build.props
  • Directory.Packages.props
  • README.md
  • Version.props
  • docs/Al1200UseIsEqualTo.md
  • docs/analyzer-confidence-audit-2026-05-23.md
  • eng/analyzer-renumber-plan.md
  • src/ANcpLua.Analyzers.AnalyzerDocs/ANcpLua.Analyzers.AnalyzerDocs.csproj
  • src/ANcpLua.Analyzers.AnalyzerDocs/Al1200UseIsEqualToDocs.cs
  • src/ANcpLua.Analyzers.AnalyzerDocs/AlAnalyzerDocsGenerator.cs
  • src/ANcpLua.Analyzers.AnalyzerDocs/AlAnalyzerDocsVerifier.cs
  • src/ANcpLua.Analyzers.AnalyzerDocsGenerator/ANcpLua.Analyzers.AnalyzerDocsGenerator.csproj
  • src/ANcpLua.Analyzers.CodeFixes/CLAUDE.md
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.Designer.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resx
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1003SpanPatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1009LockTypeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1010PatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1011NormalizeNullGuardStyleCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1200UseIsEqualToCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1201UseHasAttributeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1203UseOperationExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1204UseOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1205UseToImmutableArrayOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1206UseWhereNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1207UseToDisplayStringExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1208UseGuardNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1209UseTryParseExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1210UseStringComparisonExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1211UseAttributeExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1212UseGuardNotNullOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1213UseGuardNotNullOrWhiteSpaceCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1214UseGuardNotZeroCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1215UseGuardNotNegativeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1216UseGuardPositiveCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1217UseGuardNotEmptyGuidCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1218UseGuardDefinedEnumCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1220UseGuardForThrowIfCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1313CancellationTokenPropagationCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1314UseExplicitMidpointRoundingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1504DuckDbTableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1700StaticLambdaCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1701DateTimeNowCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1702UseSystemTextJsonCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0001SnakeCaseToPascalCaseRefactoring.cs
  • src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0002MakeStaticLambdaRefactoring.cs
  • src/ANcpLua.Analyzers/ANcpLua.Analyzers.csproj
  • src/ANcpLua.Analyzers/AlAnalyzer.cs
  • src/ANcpLua.Analyzers/AnalyzerReleases.Unshipped.md
  • src/ANcpLua.Analyzers/Analyzers/AL1000ProhibitPrimaryConstructorParameterReassignmentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1001DontRepeatNegatedPatternAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1002DontDivideByConstantZeroAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1003ToAL1004SpanComparisonAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1005FieldNameConflictWithPrimaryConstructorAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1006ToAL1008IXmlSerializableAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1009LockKeywordAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1010PreferPatternMatchingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1011NormalizeNullGuardStyleAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1012CombineDeclarationWithNullCheckAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1100ToAL1104FormBindingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1105MissingResilienceConfigurationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1106MissingHealthChecksAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1107ConsiderConnectionStringAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1108MissingServiceDiscoveryAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1109AvoidTaskRunInAspNetCoreAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1200UseIsEqualToAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1201UseHasAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1202UseTypeHierarchyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1203UseOperationExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1204UseOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1205UseToImmutableArrayOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1206UseWhereNotNullAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1207UseToDisplayStringExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1208UseGuardNotNullAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1209UseTryParseExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1210UseStringComparisonExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1211UseAttributeExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1212UseGuardNotNullOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1213UseGuardNotNullOrWhiteSpaceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1214UseGuardNotZeroAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1215UseGuardNotNegativeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1216UseGuardPositiveAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1217UseGuardNotEmptyGuidAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1218UseGuardDefinedEnumAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1219UseStringComparisonAnyExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1220UseGuardForThrowIfAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1300ToAL1303ThreadingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1304PreferAwaitUsingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1305AvoidBlockingCallsInAsyncAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1306SqlInterpolationInCommandTextAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1307FireAndForgetTaskAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1308PreferTryParseAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1309EmptyCatchBlockAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1310ExceptionLeakedInResponseAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1311UnnecessaryLinqMaterializationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1312ReadModifyWriteWithoutTransactionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1313CancellationTokenPropagationAnalysis.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1313CancellationTokenPropagationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1314UseExplicitMidpointRoundingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1400AotTestMustReturnIntAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1401AotTestExitCode100Analyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1402TrimSafeViolationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1403AotSafeViolationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1404AotSafeCallsAotUnsafeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1405UnnecessaryAotUnsafeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1406AvoidDynamicKeywordAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1407AvoidExpressionCompileAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1408AvoidActivatorCreateInstanceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1409AvoidTypeGetTypeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1500ClosedTypeHierarchySwitchAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1501SymbolStoredInModelAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1502UseIncrementalGeneratorAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1503NormalizeWhitespaceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1504DuckDbTableMustBePartialAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1505DuckDbColumnConflictingOrdinalAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1600HardcodedPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1601VersionPropsNotImportedAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1602UndefinedVersionVariableAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1603ToAL1605DiagnosticsAlignmentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1606OutdatedMafPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1700PreferStaticLambdaAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1701AvoidDateTimeNowAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1702AvoidNewtonsoftJsonAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1703UseImplicitTypeWhenApparentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1800DestructiveToolMustRequireApprovalAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1801ToolMustDeclareSideEffectAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1802ToolMustDeclareCapabilityAnalyzer.cs
  • src/ANcpLua.Analyzers/AotContext.cs
  • src/ANcpLua.Analyzers/CLAUDE.md
  • src/ANcpLua.Analyzers/CLAUDE.md
  • src/ANcpLua.Analyzers/Resources.Designer.cs
  • src/ANcpLua.Analyzers/Resources.resx
  • src/ANcpLua.Analyzers/build/ANcpLua.Analyzers.props
  • tests/ANcpLua.Analyzers.Tests/AL1000PrimaryConstructorReassignmentTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1001NegatedPatternTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1002DivisionByZeroTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1003ToAL1004SpanComparisonTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1005FieldNameConflictWithPrimaryConstructorTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1006ToAL1008IXmlSerializableTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1009LockKeywordTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1010PatternMatchingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1011NormalizeNullGuardStyleTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1012CombineDeclarationWithNullCheckTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1100ToAL1104FormBindingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1105MissingResilienceConfigurationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1106MissingHealthChecksTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1107ConsiderConnectionStringTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1108MissingServiceDiscoveryTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1109AvoidTaskRunInAspNetCoreTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1200UseIsEqualToTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1201UseHasAttributeCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1201UseHasAttributeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1202UseTypeHierarchyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1203UseOperationExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1204UseOrEmptyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1206UseWhereNotNullCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1206UseWhereNotNullTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1208UseGuardNotNullTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1209UseTryParseExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1210UseStringComparisonExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1211UseAttributeExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1212UseGuardNotNullOrEmptyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1213UseGuardNotNullOrWhiteSpaceTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1214UseGuardNotZeroTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1215UseGuardNotNegativeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1216UseGuardPositiveTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1217UseGuardNotEmptyGuidTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1218UseGuardDefinedEnumTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1219UseStringComparisonAnyExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1220UseGuardForThrowIfCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1220UseGuardForThrowIfTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1300ToAL1303ThreadingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1304PreferAwaitUsingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1305AvoidBlockingCallsInAsyncTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1306SqlInterpolationInCommandTextTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1307FireAndForgetTaskTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1308PreferTryParseTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1309EmptyCatchBlockTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1310ExceptionLeakedInResponseTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1311UnnecessaryLinqMaterializationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1312ReadModifyWriteWithoutTransactionTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1313CancellationTokenPropagationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1314UseExplicitMidpointRoundingCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1314UseExplicitMidpointRoundingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1401AotTestExitCode100Tests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1403AotSafeViolationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1404AotSafeCallsAotUnsafeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1405UnnecessaryAotUnsafeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1406AvoidDynamicKeywordTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1407AvoidExpressionCompileTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1501SymbolStoredInModelTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1502UseIncrementalGeneratorTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1503NormalizeWhitespaceTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1504DuckDbTableMustBePartialTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1505DuckDbColumnConflictingOrdinalTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1601VersionPropsNotImportedTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1602UndefinedVersionVariableTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1606OutdatedMafPackageVersionTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1700PreferStaticLambdaTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1701AvoidDateTimeNowTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1702AvoidNewtonsoftJsonTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1703UseImplicitTypeWhenApparentTests.cs
  • tests/ANcpLua.Analyzers.Tests/ANcpLua.Analyzers.Tests.csproj
  • tests/ANcpLua.Analyzers.Tests/CLAUDE.md

Comment thread .editorconfig Outdated
Comment on lines +1736 to +1743
# Semconv catalog files — historical scoped suppression carried over from the
# pre-2.0 fork era when OTel semantic-convention analyzers (AL0074/AL0010) lived
# in this assembly. They moved to Qyl.OpenTelemetry.SemanticConventions.Analyzers
# and were deleted from this repo in 2.0.0. Only AL1210 (StringComparison
# extension) still needs scoping in case Semconv catalog files are reintroduced.
# =============================================================================
[src/ANcpLua.Analyzers/Semconv/*.cs]
dotnet_diagnostic.AL0074.severity = none
dotnet_diagnostic.AL0010.severity = none
dotnet_diagnostic.AL0039.severity = none
dotnet_diagnostic.AL1210.severity = none

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if Semconv catalog files exist in the analyzer source tree.

# Test: Look for any .cs files under the Semconv directory.
fd -e cs . src/ANcpLua.Analyzers/Semconv/

# If no output, the scoped block is dead and should be deleted.

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 187


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate any Semconv-related directories anywhere in the repo (case-insensitive),
# and list any .cs files beneath them.
echo "=== Semconv directories (case-insensitive) ==="
find . -type d -iname '*semconv*' -print | sed 's|^\./||'

echo "=== .cs files under Semconv directories ==="
find . -type f -iname '*semconv*' -iname '*.cs' -print | sed 's|^\./||'

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 160


Editorconfig: scoped Semconv suppression likely dead code

The [src/ANcpLua.Analyzers/Semconv/*.cs] block setting dotnet_diagnostic.AL1210.severity = none is currently inert because there are no Semconv directories or .cs files anywhere in ANcpLua/ANcpLua.Analyzers. Remove the scoped section/comment or update the glob to the real Semconv catalog location. [.editorconfig ~1736-1743]

🤖 Prompt for 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.

In @.editorconfig around lines 1736 - 1743, The editorconfig contains a dead
scoped suppression block for Semconv files: locate the section with the header
"[src/ANcpLua.Analyzers/Semconv/*.cs]" and the setting
"dotnet_diagnostic.AL1210.severity = none" and either remove this entire scoped
block and its surrounding comment or change the glob to the actual Semconv
catalog path (or a broader pattern) so the AL1210 suppression applies where the
Semconv .cs files actually live; ensure the change keeps the comment/context
consistent with other .editorconfig entries.

Comment thread eng/analyzer-renumber-plan.md Outdated
Comment on lines +435 to +448
## 8. Consumer scan (preliminary)

Repos in `~/RiderProjects/` that reference `AL####` literally and will need rewiring after the 2.0.0 break:

| Repo | Files referencing AL#### | Surface area |
|---------------------------------------|--------------------------|----------------------------------------------------------------------------------------------------|
| `ANcpLua.NET.Sdk` | 3 | `tools/.editorconfig` (1 line: AL0025), `src/Config/Analyzer.ANcpLua.Analyzers.editorconfig` (every AL#### with a per-rule severity block — high-traffic config that consumers inherit transitively via the SDK reference). |
| `ANcpLua.Roslyn.Utilities` | 6 | **Sibling-package owner of AL0097/0098/0099/0100/0200/0201/0202/0300/0301/0302/0303.** Not a consumer of ANcpLua.Analyzers IDs; it just uses the AL prefix for its own analyzers. No rewiring needed. One stale XML-doc comment in `AnalyzerTest.cs:201` references "AL0018" as an example — needs an AL→AL1602 update or a rewrite to a generic placeholder. |
| `ErrorOrX` | 1 | `.editorconfig` (4 lines: AL0025, AL0026, AL0027, AL0029) — all `style/usage` rules. |
| `qyl` | 2 | `.globalconfig` (25+ lines covering AL0001-0025) and `.editorconfig` (similar set). High-impact — this is the largest downstream consumer. |
| `TourPlanner` | 1 | `.editorconfig` line 18: `dotnet_diagnostic.AL0038.severity = none` — **stale** (AL0038 has never existed in this repo; safe to delete). |

5 repos will need rewiring. The largest by surface area: `qyl/.globalconfig` and `ANcpLua.NET.Sdk/src/Config/Analyzer.ANcpLua.Analyzers.editorconfig`. The `qyl` repo's existing OTel-shaped configs (e.g., `qyl/.globalconfig:101 # AL0013 # Missing schema URL`) reference IDs that **no longer exist in ANcpLua.Analyzers** — those are leftover dead config from the original AL-prefixed OTel analyzer; the al-qyl-rewire agent should delete them outright rather than try to map them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Cross-repo publish order creates a config-gap window.

Section 8 identifies that ANcpLua.NET.Sdk/src/Config/Analyzer.ANcpLua.Analyzers.editorconfig packages AL0xxx severity blocks, and consumers inherit this transitively. If you publish ANcpLua.Analyzers 2.0.0 before the SDK updates and republishes its packaged editorconfig, consumers who restore will have a package whose severity config is broken—dotnet_diagnostic.AL0025.severity won't match AL1700, etc.

AGENTS.md states "publish lower layers (e.g., analyzers) before moving SDK truth upward," but here the SDK packages the analyzer editorconfig, creating a circular dependency. You must either:

  1. Publish analyzers 2.0.0, update SDK editorconfig + bump ANcpLuaAnalyzersVersion to 2.0.0, publish SDK, then announce consumers should update—accepting a brief window where early adopters get broken config.
  2. Coordinate a simultaneous SDK + analyzers release with lockstep version pins.

Plan should explicitly state which path you're taking and warn consumers about the config-gap window if choosing option 1.

Based on learnings: Cross-repo bootstrap: publish lower layers (e.g., analyzers) before moving SDK truth upward due to transitive analyzer injection.

🤖 Prompt for 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.

In `@eng/analyzer-renumber-plan.md` around lines 435 - 448, Update Section 8 of
eng/analyzer-renumber-plan.md to explicitly pick a release strategy and warn
about the config-gap: state whether you will (A) publish ANcpLua.Analyzers
2.0.0, then update
ANcpLua.NET.Sdk/src/Config/Analyzer.ANcpLua.Analyzers.editorconfig and bump the
ANcpLuaAnalyzersVersion in the SDK and publish the SDK (and include an explicit
warning to consumers about the transient broken dotnet_diagnostic.AL####
severities), or (B) perform a coordinated simultaneous release of
ANcpLua.Analyzers and ANcpLua.NET.Sdk with lockstep pins to avoid the gap;
include the chosen path, the exact steps (publish analyzers → update SDK
editorconfig → bump ANcpLuaAnalyzersVersion → publish SDK, or coordinated
publish), and a short consumer-facing warning text about the config-gap window
if option A is chosen.

Comment on lines +20 to +23
return CodeAction.Create(
CodeFixResources.AL0002CodeFixTitle,
CodeFixResources.AL1001CodeFixTitle,
_ => RemoveRepeatedNegatedPatterns(document, syntax, parent, root),
nameof(CodeFixResources.AL0002CodeFixTitle));
nameof(CodeFixResources.AL1001CodeFixTitle));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "equivalenceKey|CodeAction\.Create\(" src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs || true
sed -n '1,200p' src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs | cat -n
rg -n "DiagnosticId\s*=\s*\"AL1001\"|FixableDiagnosticIds" src/ANcpLua.Analyzers/Analyzers/AL1001DontRepeatNegatedPatternAnalyzer.cs || true
sed -n '1,200p' src/ANcpLua.Analyzers/Analyzers/AL1001DontRepeatNegatedPatternAnalyzer.cs | cat -n

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5110


Fix FixAll grouping: use the AL1001 analyzer DiagnosticId as equivalenceKey

  • Al1001SimplifyNegatedPatternCodeFixProvider uses nameof(CodeFixResources.AL1001CodeFixTitle) as the CodeAction.Create(...) equivalenceKey, which can break stable FixAll grouping; switch it to Al1001DontRepeatNegatedPatternAnalyzer.DiagnosticId.
Suggested fix
         return CodeAction.Create(
             CodeFixResources.AL1001CodeFixTitle,
             _ => RemoveRepeatedNegatedPatterns(document, syntax, parent, root),
-            nameof(CodeFixResources.AL1001CodeFixTitle));
+            Al1001DontRepeatNegatedPatternAnalyzer.DiagnosticId);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return CodeAction.Create(
CodeFixResources.AL0002CodeFixTitle,
CodeFixResources.AL1001CodeFixTitle,
_ => RemoveRepeatedNegatedPatterns(document, syntax, parent, root),
nameof(CodeFixResources.AL0002CodeFixTitle));
nameof(CodeFixResources.AL1001CodeFixTitle));
return CodeAction.Create(
CodeFixResources.AL1001CodeFixTitle,
_ => RemoveRepeatedNegatedPatterns(document, syntax, parent, root),
Al1001DontRepeatNegatedPatternAnalyzer.DiagnosticId);
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs`
around lines 20 - 23, In AL1001SimplifyNegatedPatternCodeFixProvider, the
CodeAction.Create call currently uses
nameof(CodeFixResources.AL1001CodeFixTitle) as the equivalenceKey which prevents
stable FixAll grouping; update that third argument to use
Al1001DontRepeatNegatedPatternAnalyzer.DiagnosticId instead so all fixes for
this diagnostic share the same equivalence key (locate the
CodeAction.Create(...) call that returns a CodeAction and the
RemoveRepeatedNegatedPatterns(...) delegate and replace the equivalenceKey
accordingly).

Comment on lines +16 to +19
CodeAction.Create(
CodeFixResources.AL0004CodeFixTitle,
CodeFixResources.AL1003CodeFixTitle,
_ => UsePatternMatching(document, syntax, root),
nameof(CodeFixResources.AL0004CodeFixTitle));
nameof(CodeFixResources.AL1003CodeFixTitle));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey should be the analyzer ID, not the resource property name.

Use the analyzer diagnostic ID to keep FixAll behavior stable.

Suggested fix
         CodeAction.Create(
             CodeFixResources.AL1003CodeFixTitle,
             _ => UsePatternMatching(document, syntax, root),
-            nameof(CodeFixResources.AL1003CodeFixTitle));
+            Al1003ToAl1004SpanComparisonAnalyzer.DiagnosticIdAl1003);

As per coding guidelines, "equivalenceKey must be set to the analyzer’s DiagnosticId for FixAll correctness."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CodeAction.Create(
CodeFixResources.AL0004CodeFixTitle,
CodeFixResources.AL1003CodeFixTitle,
_ => UsePatternMatching(document, syntax, root),
nameof(CodeFixResources.AL0004CodeFixTitle));
nameof(CodeFixResources.AL1003CodeFixTitle));
CodeAction.Create(
CodeFixResources.AL1003CodeFixTitle,
_ => UsePatternMatching(document, syntax, root),
Al1003ToAl1004SpanComparisonAnalyzer.DiagnosticIdAl1003);
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1003SpanPatternMatchingCodeFixProvider.cs`
around lines 16 - 19, The CodeAction.Create call is using
nameof(CodeFixResources.AL1003CodeFixTitle) as the equivalenceKey; change it to
use the analyzer diagnostic ID instead (e.g., use diagnostic.Id or the
analyzer's DiagnosticId constant such as AL1003Analyzer.DiagnosticId) so FixAll
works correctly; keep the title and the UsePatternMatching(document, syntax,
root) callback the same and only replace the equivalenceKey argument.

Comment on lines +16 to +19
CodeAction.Create(
CodeFixResources.AL0005CodeFixTitle,
CodeFixResources.AL1004CodeFixTitle,
_ => UseSequenceEqual(document, syntax, root),
nameof(CodeFixResources.AL0005CodeFixTitle));
nameof(CodeFixResources.AL1004CodeFixTitle));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Show the relevant code in the file under review
FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs"
echo "---- $FILE (around lines 1-120) ----"
nl -ba "$FILE" | sed -n '1,140p'

# 2) Locate the FixAll/equivalenceKey contract in the repo
echo "---- Searching for CLAUDE.md contract ----"
find src -maxdepth 5 -name "CLAUDE.md" -print

# print the CLAUDE.md relevant section if present
CLAUDE="$(find src -maxdepth 5 -name "CLAUDE.md" -print | head -n 1 || true)"
if [ -n "${CLAUDE:-}" ]; then
  echo "---- $CLAUDE (grep for equivalenceKey/FixAll/DiagnosticId) ----"
  nl -ba "$CLAUDE" | rg -n "equivalenceKey|FixAll|DiagnosticIdAl1004|DiagnosticId|CodeAction\.Create" || true
fi

# 3) Find the analyzer DiagnosticId for AL1004 in the analyzers code
echo "---- Searching for AL1004 analyzer DiagnosticId definition ----"
rg -n --hidden -S "AL1004" src/ANcpLua.Analyzers | head -n 50

# attempt to find a DiagnosticId constant in the codebase
rg -n --hidden -S "DiagnosticId.*AL1004|AL1004.*DiagnosticId|DiagnosticIdAl1004" src/ANcpLua.Analyzers | head -n 50

# 4) Confirm the code-fix provider’s FixableDiagnosticIds and any declared DiagnosticId constants
echo "---- Searching in AL1004 code-fix provider for FixableDiagnosticIds/DiagnosticId constants ----"
rg -n --hidden -S "FixableDiagnosticIds|DiagnosticId|equivalenceKey" "$FILE" || true

# 5) Locate any other code fixes that show the correct equivalenceKey pattern (for comparison)
echo "---- Searching other AL*.cs code fixes for equivalenceKey usage ----"
rg -n --hidden -S "CodeAction\.Create\\(.*equivalenceKey|equivalenceKey.*DiagnosticId|nameof\\(CodeFixResources\\..*\\)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes | head -n 50 || true

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 244


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs"
echo "---- $FILE (lines 1-200) ----"
cat -n "$FILE" | sed -n '1,200p'

echo "---- Searching for CLAUDE.md contract ----"
find src -name "CLAUDE.md" -print

CLAUDE_PATH="$(find src -name "CLAUDE.md" -print | head -n 1 || true)"
if [ -n "${CLAUDE_PATH}" ]; then
  echo "---- Using $CLAUDE_PATH (relevant markers) ----"
  cat -n "$CLAUDE_PATH" | rg -n "equivalenceKey|FixAll|DiagnosticId|CodeAction\.Create" || true
else
  echo "---- No CLAUDE.md found under src ----"
fi

echo "---- Searching for AL1004 DiagnosticId definitions in analyzers ----"
rg -n --hidden -S "AL1004" src/ANcpLua.Analyzers | head -n 50 || true
rg -n --hidden -S "DiagnosticId.*AL1004|AL1004.*DiagnosticId|DiagnosticIdAl1004" src/ANcpLua.Analyzers | head -n 50 || true

echo "---- Inspecting AL1004 code-fix provider for FixAll/equivalenceKey and FixableDiagnosticIds ----"
cat -n "$FILE" | rg -n "FixableDiagnosticIds|equivalenceKey|DiagnosticId|FixAll|DiagnosticIds" || true

echo "---- Comparing equivalenceKey usage in other code-fix providers ----"
rg -n --hidden -S "equivalenceKey" src/ANcpLua.Analyzers.CodeFixes/CodeFixes | head -n 80 || true

# Find patterns for equivalenceKey set to DiagnosticId or DiagnosticId constants
rg -n --hidden -S "equivalenceKey.*DiagnosticId|nameof\\(.*DiagnosticId|equivalenceKey.*nameof\\(.*DiagnosticId" src/ANcpLua.Analyzers.CodeFixes/CodeFixes || true

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 6940


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant CLAUDE.md guidance for equivalenceKey/FixAll
echo "---- src/ANcpLua.Analyzers.CodeFixes/CLAUDE.md (lines 1-140) ----"
cat -n src/ANcpLua.Analyzers.CodeFixes/CLAUDE.md | sed -n '1,160p'

echo "---- src/ANcpLua.Analyzers/CLAUDE.md (lines 1-140) ----"
cat -n src/ANcpLua.Analyzers/CLAUDE.md | sed -n '1,160p'

# Show analyzer definition for AL1004 diagnostic id constant
echo "---- AL1003ToAL1004SpanComparisonAnalyzer.cs (lines 1-120) ----"
cat -n src/ANcpLua.Analyzers/Analyzers/AL1003ToAL1004SpanComparisonAnalyzer.cs | sed -n '1,140p'

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 19526


Set FixAll equivalenceKey to the AL1004 analyzer DiagnosticId

In src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs (lines 16-19), equivalenceKey is currently nameof(CodeFixResources.AL1004CodeFixTitle); FixAll requires using the analyzer’s public diagnostic id. Change it to Al1003ToAL1004SpanComparisonAnalyzer.DiagnosticIdAl1004 ("AL1004").

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs`
around lines 16 - 19, The CodeAction created in
AL1004UseSequenceEqualCodeFixProvider.cs currently uses
nameof(CodeFixResources.AL1004CodeFixTitle) as the equivalenceKey; change that
third parameter in the CodeAction.Create call to use the analyzer's public
diagnostic id Al1003ToAL1004SpanComparisonAnalyzer.DiagnosticIdAl1004 (i.e.
"AL1004") so FixAll groups correctly, referencing the CodeAction.Create
invocation and the Al1003ToAL1004SpanComparisonAnalyzer.DiagnosticIdAl1004
symbol.

Comment on lines 28 to 34
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0122CodeFixTitle,
CodeFixResources.AL1504CodeFixTitle,
_ => MakePartialAsync(context.Document, typeDeclaration, root),
nameof(CodeFixResources.AL0122CodeFixTitle)),
nameof(CodeFixResources.AL1504CodeFixTitle)),
diagnostic);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey must use the analyzer's DiagnosticId for FixAll support.

Line 32 sets equivalenceKey to nameof(CodeFixResources.AL1504CodeFixTitle). Per coding guidelines, the equivalenceKey must be set to the analyzer's DiagnosticId.

Proposed fix
             context.RegisterCodeFix(
                 CodeAction.Create(
                     CodeFixResources.AL1504CodeFixTitle,
                     _ => MakePartialAsync(context.Document, typeDeclaration, root),
-                    nameof(CodeFixResources.AL1504CodeFixTitle)),
+                    Al1504DuckDbTableMustBePartialAnalyzer.DiagnosticId),
                 diagnostic);

As per coding guidelines: CreateCodeAction method must set equivalenceKey to the analyzer's DiagnosticId to enable FixAll support

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0122CodeFixTitle,
CodeFixResources.AL1504CodeFixTitle,
_ => MakePartialAsync(context.Document, typeDeclaration, root),
nameof(CodeFixResources.AL0122CodeFixTitle)),
nameof(CodeFixResources.AL1504CodeFixTitle)),
diagnostic);
}
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL1504CodeFixTitle,
_ => MakePartialAsync(context.Document, typeDeclaration, root),
Al1504DuckDbTableMustBePartialAnalyzer.DiagnosticId),
diagnostic);
}
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1504DuckDbTableCodeFixProvider.cs`
around lines 28 - 34, The CodeAction equivalenceKey is currently set to
nameof(CodeFixResources.AL1504CodeFixTitle); change it to use the analyzer
diagnostic id so FixAll works: when creating the CodeAction in
context.RegisterCodeFix (the CodeAction.Create call that invokes
MakePartialAsync and uses CodeFixResources.AL1504CodeFixTitle), set the
equivalenceKey to the Diagnostic.Id (e.g., diagnostic.Id or the analyzer's
DiagnosticId constant) instead of the resource name.

Comment on lines 22 to 27
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0025CodeFixTitle,
CodeFixResources.AL1700CodeFixTitle,
ct => MakeStaticAsync(context.Document, span, ct),
nameof(CodeFixResources.AL0025CodeFixTitle)),
nameof(CodeFixResources.AL1700CodeFixTitle)),
diagnostic);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey must use the analyzer's DiagnosticId for FixAll support.

Line 26 sets equivalenceKey to nameof(CodeFixResources.AL1700CodeFixTitle). Even with a custom FixAllProvider, the single-diagnostic code action registration must use the analyzer's DiagnosticId as the equivalenceKey per coding guidelines.

Proposed fix
             context.RegisterCodeFix(
                 CodeAction.Create(
                     CodeFixResources.AL1700CodeFixTitle,
                     ct => MakeStaticAsync(context.Document, span, ct),
-                    nameof(CodeFixResources.AL1700CodeFixTitle)),
+                    Al1700PreferStaticLambdaAnalyzer.DiagnosticId),
                 diagnostic);

As per coding guidelines: CreateCodeAction method must set equivalenceKey to the analyzer's DiagnosticId to enable FixAll support

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0025CodeFixTitle,
CodeFixResources.AL1700CodeFixTitle,
ct => MakeStaticAsync(context.Document, span, ct),
nameof(CodeFixResources.AL0025CodeFixTitle)),
nameof(CodeFixResources.AL1700CodeFixTitle)),
diagnostic);
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL1700CodeFixTitle,
ct => MakeStaticAsync(context.Document, span, ct),
Al1700PreferStaticLambdaAnalyzer.DiagnosticId),
diagnostic);
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1700StaticLambdaCodeFixProvider.cs`
around lines 22 - 27, The CodeAction registered in
AL1700StaticLambdaCodeFixProvider (context.RegisterCodeFix -> CodeAction.Create)
uses CodeFixResources.AL1700CodeFixTitle as the equivalenceKey; change it to the
analyzer diagnostic id so FixAll works: when creating the CodeAction for
MakeStaticAsync, pass the diagnostic's DiagnosticId (e.g., diagnostic.Id) as the
equivalenceKey instead of nameof(CodeFixResources.AL1700CodeFixTitle) so the
action's equivalenceKey matches the analyzer DiagnosticId.

Comment on lines +22 to +25
CodeAction.Create(
CodeFixResources.AL0026CodeFixTitle,
CodeFixResources.AL1701CodeFixTitle,
_ => ConvertToTimeProvider(document, memberAccess, root, diagnostic),
nameof(Al0026DateTimeNowCodeFixProvider));
nameof(Al1701DateTimeNowCodeFixProvider));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey must use the analyzer's DiagnosticId for FixAll support.

Line 25 sets equivalenceKey to nameof(Al1701DateTimeNowCodeFixProvider) (the provider class name). Per coding guidelines, the equivalenceKey must be set to the analyzer's DiagnosticId.

Proposed fix
         CodeAction.Create(
             CodeFixResources.AL1701CodeFixTitle,
             _ => ConvertToTimeProvider(document, memberAccess, root, diagnostic),
-            nameof(Al1701DateTimeNowCodeFixProvider));
+            Al1701AvoidDateTimeNowAnalyzer.DiagnosticId);

As per coding guidelines: CreateCodeAction method must set equivalenceKey to the analyzer's DiagnosticId to enable FixAll support

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CodeAction.Create(
CodeFixResources.AL0026CodeFixTitle,
CodeFixResources.AL1701CodeFixTitle,
_ => ConvertToTimeProvider(document, memberAccess, root, diagnostic),
nameof(Al0026DateTimeNowCodeFixProvider));
nameof(Al1701DateTimeNowCodeFixProvider));
CodeAction.Create(
CodeFixResources.AL1701CodeFixTitle,
_ => ConvertToTimeProvider(document, memberAccess, root, diagnostic),
Al1701AvoidDateTimeNowAnalyzer.DiagnosticId);
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1701DateTimeNowCodeFixProvider.cs`
around lines 22 - 25, The CodeAction.Create call in
AL1701DateTimeNowCodeFixProvider currently sets the equivalenceKey to the
provider class name; change it to use the analyzer's DiagnosticId to enable
FixAll support by replacing the current equivalenceKey
(nameof(Al1701DateTimeNowCodeFixProvider)) with the diagnostic's ID (e.g.,
diagnostic.Id or the analyzer's DiagnosticId constant such as
Al1701Analyzer.DiagnosticId) in the CodeAction.Create invocation that constructs
the fix for ConvertToTimeProvider.

Comment on lines 31 to 37
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0027CodeFixTitle,
CodeFixResources.AL1702CodeFixTitle,
_ => ConvertToSystemTextJson(context.Document, root, invocation, methodName, typeArgs),
nameof(Al0027UseSystemTextJsonCodeFixProvider)),
nameof(Al1702UseSystemTextJsonCodeFixProvider)),
diagnostic);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

equivalenceKey must use the analyzer's DiagnosticId for FixAll support.

Line 35 sets equivalenceKey to nameof(Al1702UseSystemTextJsonCodeFixProvider) (the provider class name). Per coding guidelines, the equivalenceKey must be set to the analyzer's DiagnosticId.

Proposed fix
             context.RegisterCodeFix(
                 CodeAction.Create(
                     CodeFixResources.AL1702CodeFixTitle,
                     _ => ConvertToSystemTextJson(context.Document, root, invocation, methodName, typeArgs),
-                    nameof(Al1702UseSystemTextJsonCodeFixProvider)),
+                    Al1702AvoidNewtonsoftJsonAnalyzer.DiagnosticId),
                 diagnostic);

As per coding guidelines: CreateCodeAction method must set equivalenceKey to the analyzer's DiagnosticId to enable FixAll support

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL0027CodeFixTitle,
CodeFixResources.AL1702CodeFixTitle,
_ => ConvertToSystemTextJson(context.Document, root, invocation, methodName, typeArgs),
nameof(Al0027UseSystemTextJsonCodeFixProvider)),
nameof(Al1702UseSystemTextJsonCodeFixProvider)),
diagnostic);
}
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL1702CodeFixTitle,
_ => ConvertToSystemTextJson(context.Document, root, invocation, methodName, typeArgs),
Al1702AvoidNewtonsoftJsonAnalyzer.DiagnosticId),
diagnostic);
}
🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1702UseSystemTextJsonCodeFixProvider.cs`
around lines 31 - 37, The CodeAction equivalenceKey is currently set to the
provider class name (nameof(Al1702UseSystemTextJsonCodeFixProvider)), which
breaks FixAll; change the equivalenceKey passed to CodeAction.Create to the
analyzer's DiagnosticId (use the Diagnostic.Id from the diagnostic parameter or
the analyzer constant) so the CodeAction's equivalenceKey matches the analyzer's
DiagnosticId and enables FixAll support—update the call in the RegisterCodeFix
block where CodeAction.Create is invoked (the invocation that builds the
CodeAction for ConvertToSystemTextJson) to supply diagnostic.Id instead of the
provider class name.

Comment thread Version.props
═══════════════════════════════════════════════════════════════════════ -->
<PropertyGroup Label="Analyzers">
<ANcpLuaAnalyzersVersion>1.29.1</ANcpLuaAnalyzersVersion>
<ANcpLuaAnalyzersVersion>1.29.4</ANcpLuaAnalyzersVersion>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift

Coordinate Version.props update and cross-repo version bumps post-publish.

ANcpLuaAnalyzersVersion=1.29.4 reflects the last published version (correct for restore-time). After this PR merges and 2.0.0 is published to NuGet, a follow-up PR (or CI auto-commit) must update this line to 2.0.0. Linked repos (ANcpLua.NET.Sdk, ErrorOrX, ANcpLua.Agents) also pin this variable and must be updated in lockstep to pull the renumbered diagnostics. Verify the publish-then-update sequencing is scripted or documented to avoid restore failures.

Based on learnings, cross-repo bootstrap requires publishing lower layers before moving SDK truth upward.

🤖 Prompt for 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.

In `@Version.props` at line 61, Update the pinned analyzer version variable
ANcpLuaAnalyzersVersion in Version.props from 1.29.4 to 2.0.0 after the new
2.0.0 package is published; then make matching updates in the other repositories
that reference this same variable (ANcpLua.NET.Sdk, ErrorOrX, ANcpLua.Agents) so
they pull the renumbered diagnostics in lockstep, and add or update CI/scripted
steps (or documentation) to enforce the publish-first then bump sequence to
avoid restore failures.

@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

Threads marked needs-human stay unresolved and block auto-merge.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua The triage report shows two categories of blocks:

Codacy threads (requires your action):

  • Oc6EeXH6AlAnalyzer.HelpLink nitpick
  • Oc6EeXH- — diagnostic ID wildcard update nitpick

These are low-risk and can only be resolved by you directly in those threads (reply to dismiss or address the nitpick).

My threads (~40):

  • The bulk are equivalenceKey correctness issues across every code fix provider — these are real bugs where CodeAction.Create equivalence keys still use the old nameof(AlXXXXCodeFixProvider) string instead of the diagnostic ID, which breaks FixAll scoping.
  • Oc6Efsyy — cross-repo publish order coordination (informational, no code change needed in this PR)
  • Oc6Efs26Version.props coordination (nitpick)

Options:

  1. Address the equivalenceKey issues — this is the substantively correct path since stale equivalence keys silently break FixAll. I can generate the patches if you want.
  2. Defer to a follow-up PR — if you want to keep this PR focused on renumbering only, I can open a tracking issue and then resolve all my threads here as deferred. Just confirm and I'll do both.

Which path do you prefer?

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua: Acknowledged. These “needs-human” threads boil down to three actionable buckets that will unblock auto-merge quickly:

  1. CodeAction equivalenceKey hygiene across all code fixes and FixAll
  2. HelpLink/wildcard updates after renumber (Codacy nitpicks)
  3. Cross‑repo release/SDK alignment notes (non‑blocking for this PR if just documented, but will block consumers post‑merge)

Below is a precise fix plan you can apply in this PR, followed by a post‑merge checklist for consumers.

Immediate PR fixes

A. Normalize CodeAction equivalenceKey usage

  • Why: Stable equivalence keys are required for proper Fix All behavior and to meet the contract flagged by the review bots.
  • Contract: For each provider, set the CodeAction equivalenceKey to the analyzer’s DiagnosticId (optionally suffixed by a deterministic variant string when a provider offers multiple distinct fixes).
  • Do NOT use provider class names as keys; keys must be stable and tied to the semantic operation.

Pattern to apply

  • Single-fix providers:
    • Replace CodeAction.Create(title, createChangedDocument, nameof(ProviderClass)) with CodeAction.Create(title, createChangedDocument, AlXXXXAnalyzer.DiagnosticId)
  • Multi-fix providers (e.g., AL1203 has two actions):
    • Suffix with a stable variant, e.g. $"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:IsMethodNamed" and $"{...}:TryGetConstantValue"
  • FixAll providers:
    • If you implement a custom FixAllProvider (e.g., StaticLambda), ensure FixAll equivalence key equals the per-action key above (same DiagnosticId[:variant]); never provider-name.

B. Sweep all CodeFixProviders in src/ANcpLua.Analyzers.CodeFixes

  • Files likely affected (examples from this PR’s scope):
    • AL1001SimplifyNegatedPatternCodeFixProvider.cs
    • AL1003SpanPatternMatchingCodeFixProvider.cs
    • AL1004UseSequenceEqualCodeFixProvider.cs
    • AL1007IXmlSerializableCodeFixProvider.cs
    • AL1009LockTypeCodeFixProvider.cs
    • AL1010PatternMatchingCodeFixProvider.cs
    • AL1011NormalizeNullGuardStyleCodeFixProvider.cs
    • AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs
    • AL1200..AL1218/1220 CodeFixProviders (multiple)
    • AL1313, AL1314 CodeFixProviders
    • AL1500, AL1503, AL1504 CodeFixProviders
    • AL1700..AL1703 CodeFixProviders
  • For each CodeAction.Create, ensure the overload with equivalenceKey is used and set as above.

Concrete code snippet (example)
C#
// before
var action = CodeAction.Create(
CodeFixResources.AL1012CodeFixTitle,
ct => CreateChangedDocumentAsync(document, decl, ct),
nameof(Al1012CombineDeclarationWithNullCheckCodeFixProvider));

// after
var action = CodeAction.Create(
CodeFixResources.AL1012CodeFixTitle,
ct => CreateChangedDocumentAsync(document, decl, ct),
Al1012CombineDeclarationWithNullCheckAnalyzer.DiagnosticId);

Multi-action example (AL1203)
C#
context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL1203CodeFixTitle,
ct => ConvertToIsMethodNamedAsync(document, node, ct),
$"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:IsMethodNamed"),
diagnostic);

context.RegisterCodeFix(
CodeAction.Create(
CodeFixResources.AL1203CodeFixTitleTryGetConstantValue,
ct => ConvertToTryGetConstantValueAsync(document, node, ct),
$"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:TryGetConstantValue"),
diagnostic);

FixAll example (AL1700)

  • If you have an inner FixAllProvider class (previously Al0025FixAllProvider), ensure FixAll equivalence key is the same DiagnosticId or DiagnosticId:Variant that the normal action uses. If FixAllProvider returns a CodeAction or batches multiple, set the CodeAction equivalenceKey accordingly and keep it stable.

C. HelpLink and diagnostic ID wildcard updates (Codacy nits)

  • AlAnalyzer.HelpLink and any docs/resolution links must emit the new banded IDs (AL1xxx) and their help slugs.
  • Audit any pattern/wildcards used in:
    • AlAnalyzer.CreateRule / HelpLink logic
    • README/docs links, and comments that generate per‑ID help URLs
    • .editorconfig blocks that previously used AL0xxx wildcards
  • Ensure wildcards and ranges reflect AL1000..AL1899 (and reserved AL1900..AL1999) instead of AL0001..AL0139.
  • If HelpLink is based on resource key or markdown path generation, double-check for renamed doc files (e.g., docs/Al1200UseIsEqualTo.md updated already).
  • If Codacy flagged “Since the AlAnalyzer.HelpLink …” it likely expects the new base URL or slug; verify the host path hasn’t changed and per‑ID URL resolves or at least syntactically matches the new ID.

D. Title non-null contract for CodeAction

  • Where CodeAction.Create is called, ensure title strings are non-null (resource keys exist after resx renames). Your diff already updated CodeFixResources.Designer.cs; just confirm no missing resource names remain after renumber (bots flagged this occasionally when resx/designer drift occurs).

Post‑merge consumer sweep (tracked separately; not blocking this PR if documented)

  • ANcpLua.NET.Sdk
    • Update packaged Analyzer.ANcpLua.Analyzers.editorconfig to AL1xxx keys; otherwise SDK severities won’t match 2.0.0 analyzers.
    • Bump ANcpLuaAnalyzersVersion to 2.0.0 in Version/GlobalPackages.props, and fix any comments/targets referencing old IDs.
  • ANcpLua.Agents, ANcpLua.Roslyn.Utilities, ErrorOrX, others
    • Replace all AL0xxx in NoWarn/editorconfig/test assertions with AL1xxx per eng/analyzer-renumber-plan.md.
    • Bump analyzer version pins to 2.0.0 to avoid restore/ID drift.
    • Update doc comments mentioning legacy IDs (e.g., AL0081 to AL1106).

How to resolve the blocking threads

  • For each CodeRabbit “equivalenceKey” item: reply “Fixed — equivalenceKey now set to <DiagnosticId[:Variant]>” and link to the commit once pushed.
  • For the “FixAll equivalenceKey” items: reply “Fixed — FixAll action/keys now use the analyzer DiagnosticId[:Variant] and are stable across documents.”
  • For the Codacy two nits:
    • HelpLink: reply “Confirmed — HelpLink generator updated for AL1xxx; links match renamed docs. If you still detect legacy pattern, point to file X line Y.”
    • Diagnostic ID wildcards: reply “Updated .editorconfig/documentation wildcards from AL0xxx to AL1xxx ranges; please recheck.”

If you want, I can generate a scoped patch plan touching only the affected providers to add the correct equivalenceKey values and point you at specific lines to edit.

…ix-first

Root cause for PR #174's CodeRabbit getting stuck (3+ hours in "Review in
progress" / "Failed to post review comments" loop):

  auto_apply_labels: true + 17 labeling_instructions
  → CR labeled the PR 9× → 8 "Review skipped" dedup'd + 1 leaked through
  → review-comments POST exceeded GitHub's batch size on the 215-file diff
  → "Failed to post review comments" → auto-retry forever

Fixes in this rewrite:

  1. auto_apply_labels: true → false        (PR labels never trigger event re-fires)
  2. labeling_instructions: 17 → 5          (high-signal labels only)
  3. disable_cache: true → false            (5-30× CR speedup)
  4. path_instructions: 17 → 7              (dedup'd via multi-glob arrays; same coverage)
  5. linked_repositories: 17 → 7            (only truly-related repos)
  6. path_filters: +9 entries               (Designer.cs, Snapshots, AnalyzerReleases.md, etc.
                                             excluded at filter level instead of instruction level)
  7. finishing_touches.custom: 5 recipes    (rewritten review-prose → autofix-first actions)
  8. pre_merge_checks.custom_checks: 12 → 18 (added 3 analyzer-discipline checks the
                                              renumber wave proved necessary)

Net delta: 695 → ~520 lines, prompt size massively smaller, autofix posture
stronger. Should let CR actually complete on big PRs without hitting GitHub's
review-comment batch limit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@coderabbitai autofix

@claude

claude Bot commented May 25, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 35 file(s) based on 40 unresolved review comments.

Files modified:

  • .editorconfig
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1003SpanPatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1009LockTypeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1010PatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1011NormalizeNullGuardStyleCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1200UseIsEqualToCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1201UseHasAttributeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1203UseOperationExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1204UseOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1205UseToImmutableArrayOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1206UseWhereNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1207UseToDisplayStringExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1208UseGuardNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1209UseTryParseExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1210UseStringComparisonExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1211UseAttributeExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1212UseGuardNotNullOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1213UseGuardNotNullOrWhiteSpaceCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1214UseGuardNotZeroCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1215UseGuardNotNegativeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1216UseGuardPositiveCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1217UseGuardNotEmptyGuidCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1218UseGuardDefinedEnumCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1220UseGuardForThrowIfCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1313CancellationTokenPropagationCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1314UseExplicitMidpointRoundingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1504DuckDbTableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1700StaticLambdaCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1701DateTimeNowCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1702UseSystemTextJsonCodeFixProvider.cs

Commit: 5e8126753de2f2ac570b9d5819990e13d314e28b

The changes have been pushed to the feat/major-renumber branch.

Time taken: 8m 27s

@codacy-production

codacy-production Bot commented May 25, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 2083 complexity · 192 duplication

Metric Results
Complexity 2083
Duplication 192

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Fixed 35 file(s) based on 40 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Fixed 5 file(s) based on 40 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fe348d832

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Version.props Outdated
═══════════════════════════════════════════════════════════════════════ -->
<PropertyGroup Label="Analyzers">
<ANcpLuaAnalyzersVersion>1.29.1</ANcpLuaAnalyzersVersion>
<ANcpLuaAnalyzersVersion>2.0.0</ANcpLuaAnalyzersVersion>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep self-referenced analyzer version on last published release

ANcpLuaAnalyzersVersion is consumed by restore-time package references (as documented in Directory.Build.props), so pinning it to 2.0.0 before that package is actually available on NuGet will make clean restores fail with NU1102 in this repo and downstream SDK consumers. The commit message itself schedules the push as a post-merge step, which means this value should remain on the last published version until publication is complete.

Useful? React with 👍 / 👎.

Diagnostic diagnostic) =>
CodeAction.Create(
"Use pattern matching",
CodeFixResources.AL1010CodeFixTitle,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add missing AL1010 code-fix resource symbol

This provider now references CodeFixResources.AL1010CodeFixTitle, but that symbol is not defined in CodeFixResources.Designer.cs (and there is no AL1010CodeFixTitle entry in CodeFixResources.resx), so the code-fix project cannot compile once this file is built. The previous version used a literal title string, so this unresolved resource reference is introduced by this commit.

Useful? React with 👍 / 👎.

@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

  • thread Oc6EhFBM from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhFBP from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

  • thread Oc6EhFBM from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhFBP from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

Threads marked needs-human stay unresolved and block auto-merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

PR / Commit

  • Committed on current branch: 0368114
  • Created follow-up PR metadata via make_pr with title:
    fix(pr-174): keep analyzer pin on published version and add AL1010 code-fix resource

Testing

  • dotnet build ANcpLua.Analyzers.slnx -c Release (failed: dotnet: command not found in this environment)

View task →

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Reverted ANcpLuaAnalyzersVersion back to 1.29.4 so restore-time references remain on the last published analyzer package until 2.0.0 is actually published, addressing the pre-publish NU1102 risk. Version.propsL60-L63
  • Added the missing AL1010CodeFixTitle entry to CodeFixResources.resx so AL1010PatternMatchingCodeFixProvider can resolve the resource-backed title. src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resxL94-L99
  • Added the corresponding generated accessor AL1010CodeFixTitle in CodeFixResources.Designer.cs to fix the compile-time missing symbol issue. src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.Designer.csL102-L106
  • Committed changes as 73fff5c and recorded a PR payload via make_pr titled: “fix(pr174): restore pre-publish analyzer pin and add AL1010 code-fix resource”.

Testing

  • ⚠️ dotnet build ANcpLua.Analyzers.slnx -c Release (failed in this environment because dotnet is not installed: /bin/bash: dotnet: command not found)

View task →

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua: Here’s the shortest path to unblock auto-merge.

What’s already fixed in this PR

  • Equivalence keys: A large sweep landed via autofix. Most CodeAction.Create(…, equivalenceKey: …) now use the analyzer DiagnosticId. Good.

What still needs explicit confirmation/actions

  • FixAll equivalence keys: Verify AL1700 StaticLambda custom FixAll provider returns actions with the same DiagnosticId-based equivalenceKey as the per-diagnostic action. If any FixAll paths still use provider-name keys, change to Al1700PreferStaticLambdaAnalyzer.DiagnosticId (or DiagnosticId:Variant when applicable).
  • Multi-action providers: Where a provider registers multiple code actions (e.g., AL1203 UseOperationExtensions), ensure each action’s equivalenceKey is DiagnosticId plus a stable variant suffix (e.g., AL1203:IsMethodNamed, AL1203:TryGetConstantValue). If any survivors still use nameof(…CodeFixProvider), switch them.
  • HelpLink nit (Codacy): Confirm AlAnalyzer.HelpLink builds URLs for the new AL1xxx ranges and points to the renamed docs (e.g., docs/Al1200UseIsEqualTo.md). If any base path or slug logic still assumes AL0xxx, update it.
  • Wildcard nit (Codacy): In .editorconfig, replace any AL0xxx wildcards/ranges with AL1xxx (ex: AL1000–AL1899). If the SDK or docs still show AL0xxx ranges, update them too.

How to close the blocking threads

  • For each CodeRabbit “equivalenceKey” thread: “Fixed — equivalenceKey now uses .DiagnosticId[:Variant].”
  • For FixAll ones: “Fixed — FixAll actions use the same DiagnosticId[:Variant] equivalenceKey.”
  • For Codacy two nits: “HelpLink/wildcards updated for AL1xxx; please recheck.”

Optional but recommended follow-up (post-merge)

  • ANcpLua.NET.Sdk: ship an updated Analyzer.ANcpLua.Analyzers.editorconfig with AL1xxx keys; bump ANcpLuaAnalyzersVersion to 2.0.0.
  • Consumers (Agents, Roslyn.Utilities, ErrorOrX, …): replace AL0xxx in editorconfig/NoWarn/tests with AL1xxx using eng/analyzer-renumber-plan.md; bump pins to 2.0.0.

If you want me to open a single tracking issue per-repo for the consumer sweep and release order, say “open issues,” and I’ll file them with links back to this PR.

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua: To unblock auto-merge, tackle these in order:

  1. CodeAction/FixAll equivalenceKey hygiene (blocking)
  • Contract: Use the analyzer DiagnosticId as the equivalence key; for multi-action providers, suffix a stable variant. Never use provider class names.
  • Apply across all CodeFixProviders under src/ANcpLua.Analyzers.CodeFixes:
    • Single action example:
      CodeAction.Create(title, create, Al1012CombineDeclarationWithNullCheckAnalyzer.DiagnosticId)
    • Multi action example (distinct fixes in one provider):
      CodeAction.Create(title1, create1, $"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:IsMethodNamed")
      CodeAction.Create(title2, create2, $"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:TryGetConstantValue")
  • FixAll implementations: return actions whose equivalenceKey matches the per‑action key above (same DiagnosticId[:Variant]); do not invent a new key or use provider name.
  • After the autofix commits, a handful of providers still likely need this change (symptoms: CodeAction.Create(...) with nameof(ProviderType) as the 3rd arg, or using the 2‑arg overload with no key). Do a quick sweep and replace.
  1. Codacy nits (manual resolve)
  • HelpLink: Ensure AlAnalyzer.HelpLink now emits AL1xxx IDs in the URL path. If it’s generated, confirm the base path and slugs reflect the new bands; if hardcoded anywhere, update.
  • Diagnostic ID wildcards: Update any remaining AL0xxx wildcards/ranges in .editorconfig/docs/comments to AL1xxx bands (AL1000..AL1899; AL1900..1899 future bands per your plan). If already changed, reply and dismiss.
  1. Post‑merge (non‑blocking for this PR, but required for consumers)
  • ANcpLua.NET.Sdk: ship an updated Analyzer.ANcpLua.Analyzers.editorconfig with AL1xxx keys; bump ANcpLuaAnalyzersVersion to 2.0.0; fix comments/targets referencing AL00xx.
  • Repos with NoWarn/editorconfig/test assertions: swap AL0xxx to AL1xxx using eng/analyzer-renumber-plan.md mapping; bump analyzer version pins to 2.0.0.

If you want me to drive the equivalenceKey sweep in this PR, say “go” and I’ll enumerate the exact edits per file and variants needed, then you can apply/push and I’ll resolve all my threads. If you’d prefer to defer, I can open a tracking issue and mark these threads as follow-up.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs (1)

24-27: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use DiagnosticId as equivalenceKey for FixAll support.

Line 27 passes UseImplicitTypeTitle as the equivalenceKey. As per coding guidelines, the equivalenceKey must be the analyzer's diagnostic ID to enable correct FixAll scoping. Replace line 27 with Al1703UseImplicitTypeWhenApparentAnalyzer.DiagnosticId.

🔧 Proposed fix
     CodeAction.Create(
         UseImplicitTypeTitle,
         _ => UseImplicitType(document, root, syntax),
-        UseImplicitTypeTitle);
+        Al1703UseImplicitTypeWhenApparentAnalyzer.DiagnosticId);

As per coding guidelines, "Reference the analyzer's public DiagnosticId directly in CodeFixProvider implementations" and "CodeFixProvider implementations must include an equivalenceKey parameter in CodeAction.Create() calls — required for FixAll support."

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs`
around lines 24 - 27, Replace the hard-coded equivalence key being passed to
CodeAction.Create with the analyzer's DiagnosticId to enable FixAll scoping: in
the CodeAction.Create call that currently uses UseImplicitTypeTitle as the third
argument, pass Al1703UseImplicitTypeWhenApparentAnalyzer.DiagnosticId instead;
locate the CodeAction.Create invocation (alongside UseImplicitType and
UseImplicitTypeTitle) and update the equivalenceKey argument accordingly.
tests/ANcpLua.Analyzers.Tests/AL1106MissingHealthChecksTests.cs (1)

11-50: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Switch this test class to the repository analyzer-test base abstraction.

Al1106MissingHealthChecksTests is still using a local CSharpAnalyzerTest<...> harness; this path requires the shared analyzer test base pattern for consistency and maintenance.

As per coding guidelines, "tests/ANcpLua.Analyzers.Tests/**/Tests.cs: Use AnalyzerTest base class for analyzer-only tests in xunit.v3" and "tests/ANcpLua.Analyzers.Tests/ALTests.cs: Analyzer tests must inherit from AnalyzerTestBase alias (typed to the specific analyzer)."

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/AL1106MissingHealthChecksTests.cs` around lines
11 - 50, Replace the local CSharpAnalyzerTest harness in
Al1106MissingHealthChecksTests with the repository's analyzer-test base by
converting the class to inherit the AnalyzerTestBase (or
AnalyzerTest<Al1106MissingHealthChecksAnalyzer>) pattern and remove the manual
CSharpAnalyzerTest<Al1106MissingHealthChecksAnalyzer, DefaultVerifier> creation
inside VerifyAsync; instead use the base test helper(s) to set TestCode (combine
Stubs + source), ReferenceAssemblies, MarkupOptions, and additional references
(replace test.TestState.AdditionalReferences.AddRange(Net100.References.All)
with the equivalent base-class setup), then call the base-run helper (e.g.,
RunAsync) to execute the test; update or remove VerifyAsync to delegate to the
new base implementation and keep references to unique symbols such as
Al1106MissingHealthChecksTests, VerifyAsync, Stubs, TestCode,
ReferenceAssemblies, MarkupOptions, and Net100.References.All when making the
change.
♻️ Duplicate comments (2)
src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs (1)

10-10: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Change base class to AlCodeFixProvider<T>.

Line 10 still derives from CodeFixProvider directly. As per coding guidelines, code fix providers must inherit from AlCodeFixProvider<T> (in this case, AlCodeFixProvider<CSharpSyntaxNode> or appropriate syntax node type). Update the class declaration and ensure [ExportCodeFixProvider] and [Shared] attributes are present.

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs`
at line 10, The class Al1007IXmlSerializableCodeFixProvider currently inherits
directly from CodeFixProvider; change its base to the generic helper
AlCodeFixProvider<T> (e.g., AlCodeFixProvider<CSharpSyntaxNode> or the
appropriate Roslyn syntax node type used across the project) and update the
class declaration accordingly; also ensure the class is decorated with
[ExportCodeFixProvider] and [Shared] attributes so it follows the project
conventions for code fix providers.
src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs (1)

15-16: 🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Migrate this AL code fix to AlCodeFixProvider<TNode> base.

Line 15 still inherits CodeFixProvider, which violates the required provider contract for AL code fixes in this repository.

As per coding guidelines, src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL*.cs: CodeFixProvider implementations must use the AlCodeFixProvider base class with a generic node type parameter.

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs`
around lines 15 - 16, The class Al1202UseTypeHierarchyCodeFixProvider currently
inherits CodeFixProvider; change its base to the repository-standard generic
AlCodeFixProvider<TNode> (replace CodeFixProvider with AlCodeFixProvider<TNode>
using the appropriate node type used by this analyzer), update the class
declaration accordingly and remove or adapt the FixableDiagnosticIds override to
match the AlCodeFixProvider pattern, and adjust any constructor or member usage
that assumed CodeFixProvider methods so the provider conforms to the
AlCodeFixProvider<TNode> contract (keep the DiagnosticId reference to
Al1202UseTypeHierarchyAnalyzer.DiagnosticId).
🤖 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 `@eng/analyzer-renumber-plan.md`:
- Line 157: The markdown uses bare triple-backtick fences at the examples in
analyzer-renumber-plan.md (notably the fenced blocks currently at lines
referenced in the review) which triggers MD040; update each of those fenced code
blocks (the blocks containing lists like "AL0010 AL0012...",
"AL0010CodeFixTitle...", and the mapping block "AL{old}AnalyzerTitle ->
AL{new}AnalyzerTitle") to include a language identifier (e.g., text) immediately
after the opening ``` so they become ```text, ensuring all three problematic
blocks are consistently annotated to satisfy the linter.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs`:
- Line 31: The code actions in AL1500AddMissingCasesCodeFixProvider are using
the resource name string as the equivalenceKey; change both CodeAction.Create
calls to use Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId as the
equivalenceKey so FixAll groups by the analyzer diagnostic ID. Locate the
CodeAction.Create invocations in class AL1500AddMissingCasesCodeFixProvider and
replace the current nameof(CodeFixResources.AL1500CodeFixTitle) equivalenceKey
argument with Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId for both code
actions so they share the stable identifier.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs`:
- Line 10: The class Al1503NormalizeWhitespaceCodeFixProvider currently inherits
from CodeFixProvider; change its base to the AL-specific generic base by making
it inherit from AlCodeFixProvider<TNode> (replace CodeFixProvider with
AlCodeFixProvider<TNode> and pick the appropriate AL SyntaxNode type used by
this fix), update any constructors/overrides to match the AlCodeFixProvider API
(e.g., constructor signature, RegisterCodeFixesAsync/FixAllProvider overrides if
their signatures differ), and add the necessary using/import for the
AlCodeFixProvider type so the class compiles while preserving the existing class
name Al1503NormalizeWhitespaceCodeFixProvider and its existing members.
- Around line 33-36: AL1503NormalizeWhitespaceCodeFixProvider currently inherits
CodeFixProvider directly; change its base to AlCodeFixProvider<TNode> (using the
appropriate syntax and TNode type that matches the analyzed node used by
RemoveNormalizeWhitespaceAsync) so it follows the AL code-fix pattern. Update
the class declaration for AL1503NormalizeWhitespaceCodeFixProvider to inherit
from AlCodeFixProvider<TNode>, ensure constructor and any overrides match the
generic base (adjust method signatures if the base requires an overridden
RegisterCodeFixesAsync or similar), and keep the existing CodeAction.Create call
and RemoveNormalizeWhitespaceAsync method intact but adapted to the generic node
type.

In `@src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resx`:
- Around line 157-159: Update the resource string AL1217CodeFixTitle so the
displayed title matches the analyzer intent: change the value text from "Use
Guard.NotEmpty" to "Use Guard.NotEmptyGuid" to correctly reference GUID
validation (AL0050); locate the AL1217CodeFixTitle resource entry in
CodeFixResources.resx and replace the value accordingly.

In `@src/ANcpLua.Analyzers/Analyzers/AL1600HardcodedPackageVersionAnalyzer.cs`:
- Line 13: The class Al1600HardcodedPackageVersionAnalyzer currently derives
from DiagnosticAnalyzer but must inherit from the project-specific base
AlAnalyzer to comply with the analyzer contract; change its declaration so the
sealed partial class Al1600HardcodedPackageVersionAnalyzer : DiagnosticAnalyzer
becomes sealed partial class Al1600HardcodedPackageVersionAnalyzer : AlAnalyzer,
and ensure any required constructor or overrides expected by AlAnalyzer are
implemented or forwarded (update base constructor calls and override signatures
as needed to match AlAnalyzer’s API).

In `@src/ANcpLua.Analyzers/Analyzers/AL1606OutdatedMafPackageVersionAnalyzer.cs`:
- Line 14: The analyzer class Al1606OutdatedMafPackageVersionAnalyzer currently
inherits from DiagnosticAnalyzer; change its declaration to inherit from
AlAnalyzer (keep the sealed partial class modifiers), add any required using for
the AlAnalyzer type, and update/remove any members or overrides that must
conform to AlAnalyzer’s API (e.g., constructor signature or overridden
properties/methods) so the class compiles and follows the shared analyzer base
contract.

In `@tests/ANcpLua.Analyzers.Tests/AL1010PatternMatchingTests.cs`:
- Line 10: The test class Al1010PatternMatchingTests currently inherits directly
from AnalyzerTest<Al1010PreferPatternMatchingAnalyzer>; change its base to the
file-local alias AnalyzerTestBase typed to the same analyzer (i.e., make the
class inherit from AnalyzerTestBase<Al1010PreferPatternMatchingAnalyzer>) so it
follows the project test convention while keeping the sealed partial class
modifiers and the existing class name.

In `@tests/ANcpLua.Analyzers.Tests/AL1011NormalizeNullGuardStyleTests.cs`:
- Around line 57-58: The generic type argument list in the class declaration
Al1011PortableFormCodeFixTests splits the comma onto the next line before the
second type argument; update the declaration so the comma follows the first type
argument on the same line (e.g., "Al1011NormalizeNullGuardStyleAnalyzer,
Al1011NormalizeNullGuardStyleCodeFixProvider") to satisfy SA1113/SA1115; apply
the same fix to the other occurrences mentioned (the other class/generic
declarations around the noted lines).

In `@tests/ANcpLua.Analyzers.Tests/AL1214UseGuardNotZeroTests.cs`:
- Around line 7-9: The test class Al1214UseGuardNotZeroTests currently inherits
from AnalyzerTest<Al1214UseGuardNotZeroAnalyzer>; change its base to the
repository's AnalyzerTestBase alias typed to the analyzer (i.e.
AnalyzerTestBase<Al1214UseGuardNotZeroAnalyzer>) while keeping the sealed
partial class modifiers so the class signature reads as a sealed partial class
using the AnalyzerTestBase alias.

In `@tests/ANcpLua.Analyzers.Tests/AL1404AotSafeCallsAotUnsafeTests.cs`:
- Line 9: The test class Al1404AotSafeCallsAotUnsafeTests currently inherits
directly from AnalyzerTest<Al1404AotSafeCallsAotUnsafeAnalyzer>; change it to
use the file-local typed alias AnalyzerTestBase (typed to
Al1404AotSafeCallsAotUnsafeAnalyzer) so the class becomes sealed partial class
Al1404AotSafeCallsAotUnsafeTests : AnalyzerTestBase; locate the class
declaration and replace the generic base type with the alias while keeping the
sealed partial modifiers.

In `@tests/ANcpLua.Analyzers.Tests/AL1703UseImplicitTypeWhenApparentTests.cs`:
- Around line 10-11: The test class Al1703UseImplicitTypeWhenApparentTests
currently inherits AnalyzerTest<Al1703UseImplicitTypeWhenApparentAnalyzer>;
update the inheritance to use the required typed alias AnalyzerTestBase by
changing the base to AnalyzerTestBase<Al1703UseImplicitTypeWhenApparentAnalyzer>
so the sealed partial class follows the analyzer test pattern.

In `@tests/ANcpLua.Analyzers.Tests/CLAUDE.md`:
- Line 75: The table row breaks Markdown parsing because the diagnostic marker
`{|AL1000:code|}` contains unescaped pipe characters; fix by escaping the pipes
inside that cell (e.g., replace `{|AL1000:code|}` with
`{&`#124`;AL1000:code&`#124`;}` or `{\\|AL1000:code\\|}`) so the row remains two
columns and MD056 is resolved.

---

Outside diff comments:
In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs`:
- Around line 24-27: Replace the hard-coded equivalence key being passed to
CodeAction.Create with the analyzer's DiagnosticId to enable FixAll scoping: in
the CodeAction.Create call that currently uses UseImplicitTypeTitle as the third
argument, pass Al1703UseImplicitTypeWhenApparentAnalyzer.DiagnosticId instead;
locate the CodeAction.Create invocation (alongside UseImplicitType and
UseImplicitTypeTitle) and update the equivalenceKey argument accordingly.

In `@tests/ANcpLua.Analyzers.Tests/AL1106MissingHealthChecksTests.cs`:
- Around line 11-50: Replace the local CSharpAnalyzerTest harness in
Al1106MissingHealthChecksTests with the repository's analyzer-test base by
converting the class to inherit the AnalyzerTestBase (or
AnalyzerTest<Al1106MissingHealthChecksAnalyzer>) pattern and remove the manual
CSharpAnalyzerTest<Al1106MissingHealthChecksAnalyzer, DefaultVerifier> creation
inside VerifyAsync; instead use the base test helper(s) to set TestCode (combine
Stubs + source), ReferenceAssemblies, MarkupOptions, and additional references
(replace test.TestState.AdditionalReferences.AddRange(Net100.References.All)
with the equivalent base-class setup), then call the base-run helper (e.g.,
RunAsync) to execute the test; update or remove VerifyAsync to delegate to the
new base implementation and keep references to unique symbols such as
Al1106MissingHealthChecksTests, VerifyAsync, Stubs, TestCode,
ReferenceAssemblies, MarkupOptions, and Net100.References.All when making the
change.

---

Duplicate comments:
In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs`:
- Line 10: The class Al1007IXmlSerializableCodeFixProvider currently inherits
directly from CodeFixProvider; change its base to the generic helper
AlCodeFixProvider<T> (e.g., AlCodeFixProvider<CSharpSyntaxNode> or the
appropriate Roslyn syntax node type used across the project) and update the
class declaration accordingly; also ensure the class is decorated with
[ExportCodeFixProvider] and [Shared] attributes so it follows the project
conventions for code fix providers.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs`:
- Around line 15-16: The class Al1202UseTypeHierarchyCodeFixProvider currently
inherits CodeFixProvider; change its base to the repository-standard generic
AlCodeFixProvider<TNode> (replace CodeFixProvider with AlCodeFixProvider<TNode>
using the appropriate node type used by this analyzer), update the class
declaration accordingly and remove or adapt the FixableDiagnosticIds override to
match the AlCodeFixProvider pattern, and adjust any constructor or member usage
that assumed CodeFixProvider methods so the provider conforms to the
AlCodeFixProvider<TNode> contract (keep the DiagnosticId reference to
Al1202UseTypeHierarchyAnalyzer.DiagnosticId).
🪄 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: ASSERTIVE

Plan: Pro Plus

Run ID: 566e0d30-7e0e-43e0-bbf5-cf47a439d4c1

📥 Commits

Reviewing files that changed from the base of the PR and between 9d7393e and 2fe348d.

⛔ Files ignored due to path filters (9)
  • .coderabbit.yaml is excluded by none and included by none
  • .editorconfig is excluded by none and included by none
  • AGENTS.md is excluded by none and included by none
  • CHANGELOG.md is excluded by none and included by none
  • README.md is excluded by none and included by none
  • docs/Al1200UseIsEqualTo.md is excluded by none and included by none
  • docs/analyzer-confidence-audit-2026-05-23.md is excluded by none and included by none
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.Designer.cs is excluded by !**/*.Designer.cs and included by src/**
  • src/ANcpLua.Analyzers/Resources.Designer.cs is excluded by !**/*.Designer.cs and included by src/**
📒 Files selected for processing (207)
  • Directory.Build.props
  • Directory.Packages.props
  • Version.props
  • eng/analyzer-renumber-plan.md
  • src/ANcpLua.Analyzers.AnalyzerDocs/ANcpLua.Analyzers.AnalyzerDocs.csproj
  • src/ANcpLua.Analyzers.AnalyzerDocs/Al1200UseIsEqualToDocs.cs
  • src/ANcpLua.Analyzers.AnalyzerDocs/AlAnalyzerDocsGenerator.cs
  • src/ANcpLua.Analyzers.AnalyzerDocs/AlAnalyzerDocsVerifier.cs
  • src/ANcpLua.Analyzers.AnalyzerDocsGenerator/ANcpLua.Analyzers.AnalyzerDocsGenerator.csproj
  • src/ANcpLua.Analyzers.CodeFixes/CLAUDE.md
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resx
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1003SpanPatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1004UseSequenceEqualCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1007IXmlSerializableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1009LockTypeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1010PatternMatchingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1011NormalizeNullGuardStyleCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1200UseIsEqualToCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1201UseHasAttributeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1202UseTypeHierarchyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1203UseOperationExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1204UseOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1205UseToImmutableArrayOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1206UseWhereNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1207UseToDisplayStringExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1208UseGuardNotNullCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1209UseTryParseExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1210UseStringComparisonExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1211UseAttributeExtensionsCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1212UseGuardNotNullOrEmptyCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1213UseGuardNotNullOrWhiteSpaceCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1214UseGuardNotZeroCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1215UseGuardNotNegativeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1216UseGuardPositiveCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1217UseGuardNotEmptyGuidCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1218UseGuardDefinedEnumCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1220UseGuardForThrowIfCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1313CancellationTokenPropagationCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1314UseExplicitMidpointRoundingCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1504DuckDbTableCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1700StaticLambdaCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1701DateTimeNowCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1702UseSystemTextJsonCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0001SnakeCaseToPascalCaseRefactoring.cs
  • src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0002MakeStaticLambdaRefactoring.cs
  • src/ANcpLua.Analyzers/ANcpLua.Analyzers.csproj
  • src/ANcpLua.Analyzers/AlAnalyzer.cs
  • src/ANcpLua.Analyzers/AnalyzerReleases.Unshipped.md
  • src/ANcpLua.Analyzers/Analyzers/AL1000ProhibitPrimaryConstructorParameterReassignmentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1001DontRepeatNegatedPatternAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1002DontDivideByConstantZeroAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1003ToAL1004SpanComparisonAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1005FieldNameConflictWithPrimaryConstructorAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1006ToAL1008IXmlSerializableAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1009LockKeywordAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1010PreferPatternMatchingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1011NormalizeNullGuardStyleAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1012CombineDeclarationWithNullCheckAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1100ToAL1104FormBindingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1105MissingResilienceConfigurationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1106MissingHealthChecksAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1107ConsiderConnectionStringAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1108MissingServiceDiscoveryAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1109AvoidTaskRunInAspNetCoreAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1200UseIsEqualToAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1201UseHasAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1202UseTypeHierarchyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1203UseOperationExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1204UseOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1205UseToImmutableArrayOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1206UseWhereNotNullAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1207UseToDisplayStringExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1208UseGuardNotNullAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1209UseTryParseExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1210UseStringComparisonExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1211UseAttributeExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1212UseGuardNotNullOrEmptyAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1213UseGuardNotNullOrWhiteSpaceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1214UseGuardNotZeroAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1215UseGuardNotNegativeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1216UseGuardPositiveAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1217UseGuardNotEmptyGuidAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1218UseGuardDefinedEnumAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1219UseStringComparisonAnyExtensionsAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1220UseGuardForThrowIfAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1300ToAL1303ThreadingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1304PreferAwaitUsingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1305AvoidBlockingCallsInAsyncAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1306SqlInterpolationInCommandTextAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1307FireAndForgetTaskAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1308PreferTryParseAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1309EmptyCatchBlockAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1310ExceptionLeakedInResponseAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1311UnnecessaryLinqMaterializationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1312ReadModifyWriteWithoutTransactionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1313CancellationTokenPropagationAnalysis.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1313CancellationTokenPropagationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1314UseExplicitMidpointRoundingAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1400AotTestMustReturnIntAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1401AotTestExitCode100Analyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1402TrimSafeViolationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1403AotSafeViolationAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1404AotSafeCallsAotUnsafeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1405UnnecessaryAotUnsafeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1406AvoidDynamicKeywordAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1407AvoidExpressionCompileAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1408AvoidActivatorCreateInstanceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1409AvoidTypeGetTypeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1500ClosedTypeHierarchySwitchAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1501SymbolStoredInModelAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1502UseIncrementalGeneratorAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1503NormalizeWhitespaceAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1504DuckDbTableMustBePartialAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1505DuckDbColumnConflictingOrdinalAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1600HardcodedPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1601VersionPropsNotImportedAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1602UndefinedVersionVariableAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1603ToAL1605DiagnosticsAlignmentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1606OutdatedMafPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1700PreferStaticLambdaAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1701AvoidDateTimeNowAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1702AvoidNewtonsoftJsonAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1703UseImplicitTypeWhenApparentAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1800DestructiveToolMustRequireApprovalAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1801ToolMustDeclareSideEffectAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL1802ToolMustDeclareCapabilityAnalyzer.cs
  • src/ANcpLua.Analyzers/AotContext.cs
  • src/ANcpLua.Analyzers/CLAUDE.md
  • src/ANcpLua.Analyzers/CLAUDE.md
  • src/ANcpLua.Analyzers/Resources.resx
  • src/ANcpLua.Analyzers/build/ANcpLua.Analyzers.props
  • tests/ANcpLua.Analyzers.Tests/AL1000PrimaryConstructorReassignmentTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1001NegatedPatternTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1002DivisionByZeroTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1003ToAL1004SpanComparisonTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1005FieldNameConflictWithPrimaryConstructorTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1006ToAL1008IXmlSerializableTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1009LockKeywordTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1010PatternMatchingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1011NormalizeNullGuardStyleTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1012CombineDeclarationWithNullCheckTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1100ToAL1104FormBindingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1105MissingResilienceConfigurationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1106MissingHealthChecksTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1107ConsiderConnectionStringTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1108MissingServiceDiscoveryTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1109AvoidTaskRunInAspNetCoreTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1200UseIsEqualToTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1201UseHasAttributeCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1201UseHasAttributeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1202UseTypeHierarchyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1203UseOperationExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1204UseOrEmptyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1206UseWhereNotNullCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1206UseWhereNotNullTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1208UseGuardNotNullTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1209UseTryParseExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1210UseStringComparisonExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1211UseAttributeExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1212UseGuardNotNullOrEmptyTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1213UseGuardNotNullOrWhiteSpaceTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1214UseGuardNotZeroTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1215UseGuardNotNegativeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1216UseGuardPositiveTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1217UseGuardNotEmptyGuidTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1218UseGuardDefinedEnumTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1219UseStringComparisonAnyExtensionsTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1220UseGuardForThrowIfCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1220UseGuardForThrowIfTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1300ToAL1303ThreadingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1304PreferAwaitUsingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1305AvoidBlockingCallsInAsyncTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1306SqlInterpolationInCommandTextTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1307FireAndForgetTaskTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1308PreferTryParseTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1309EmptyCatchBlockTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1310ExceptionLeakedInResponseTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1311UnnecessaryLinqMaterializationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1312ReadModifyWriteWithoutTransactionTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1313CancellationTokenPropagationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1314UseExplicitMidpointRoundingCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1314UseExplicitMidpointRoundingTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1401AotTestExitCode100Tests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1403AotSafeViolationTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1404AotSafeCallsAotUnsafeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1405UnnecessaryAotUnsafeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1406AvoidDynamicKeywordTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1407AvoidExpressionCompileTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1501SymbolStoredInModelTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1502UseIncrementalGeneratorTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1503NormalizeWhitespaceTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1504DuckDbTableMustBePartialTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1505DuckDbColumnConflictingOrdinalTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1601VersionPropsNotImportedTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1602UndefinedVersionVariableTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1606OutdatedMafPackageVersionTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1700PreferStaticLambdaTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1701AvoidDateTimeNowTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1702AvoidNewtonsoftJsonTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL1703UseImplicitTypeWhenApparentTests.cs
  • tests/ANcpLua.Analyzers.Tests/ANcpLua.Analyzers.Tests.csproj
  • tests/ANcpLua.Analyzers.Tests/CLAUDE.md


`src/ANcpLua.Analyzers/Resources.resx` contains 390 `<data name="AL####...">` entries spanning numeric IDs `AL0001..AL0136`. Cross-referencing against the active analyzer literals reveals **44 numeric IDs that have no live analyzer in this repo**:

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add fenced-code language identifiers to clear markdown lint failures.

Line 157, Line 174, and Line 221 use bare triple-backtick fences, which triggers MD040.

Suggested patch
-```
+```text
 AL0010 AL0012 AL0013
 AL0061 AL0062 AL0063 AL0064 AL0065 AL0066 AL0067 AL0068 AL0069 AL0070
 ...
 AL0131 AL0132 AL0133 AL0134 AL0135 AL0136

- +text
AL0010CodeFixTitle
AL0012CodeFixTitle
...
AL0135CodeFixTitle


-```
+```text
AL{old}AnalyzerTitle           -> AL{new}AnalyzerTitle
AL{old}AnalyzerMessageFormat   -> AL{new}AnalyzerMessageFormat
AL{old}AnalyzerDescription     -> AL{new}AnalyzerDescription
AL{old}CodeFixTitle            -> AL{new}CodeFixTitle
AL{old}{Variant}CodeFixTitle   -> AL{new}{Variant}CodeFixTitle

</details>


Also applies to: 174-174, 221-221

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 157-157: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @eng/analyzer-renumber-plan.md at line 157, The markdown uses bare
triple-backtick fences at the examples in analyzer-renumber-plan.md (notably the
fenced blocks currently at lines referenced in the review) which triggers MD040;
update each of those fenced code blocks (the blocks containing lists like
"AL0010 AL0012...", "AL0010CodeFixTitle...", and the mapping block
"AL{old}AnalyzerTitle -> AL{new}AnalyzerTitle") to include a language identifier
(e.g., text) immediately after the opening so they becometext, ensuring
all three problematic blocks are consistently annotated to satisfy the linter.


</details>

<!-- fingerprinting:phantom:poseidon:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

CodeFixResources.AL1500CodeFixTitle,
_ => FixSwitchExpression(document, root, switchExpr, raw),
nameof(CodeFixResources.AL0103CodeFixTitle)),
nameof(CodeFixResources.AL1500CodeFixTitle)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the analyzer DiagnosticId as the equivalenceKey for both code actions.

Line 31 and Line 36 key by resource-name string; key by Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId to keep FixAll identity tied to the diagnostic.

Suggested patch
             SwitchExpressionSyntax switchExpr => CodeAction.Create(
                 CodeFixResources.AL1500CodeFixTitle,
                 _ => FixSwitchExpression(document, root, switchExpr, raw),
-                nameof(CodeFixResources.AL1500CodeFixTitle)),
+                Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId),
@@
             SwitchStatementSyntax switchStmt => CodeAction.Create(
                 CodeFixResources.AL1500CodeFixTitle,
                 _ => FixSwitchStatement(document, root, switchStmt, raw),
-                nameof(CodeFixResources.AL1500CodeFixTitle)),
+                Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId),

As per coding guidelines, src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL*.cs: reference the analyzer’s public DiagnosticId directly in CodeFixProvider implementations, and include a stable equivalenceKey in CodeAction.Create() for FixAll support.

Also applies to: 36-36

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs`
at line 31, The code actions in AL1500AddMissingCasesCodeFixProvider are using
the resource name string as the equivalenceKey; change both CodeAction.Create
calls to use Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId as the
equivalenceKey so FixAll groups by the analyzer diagnostic ID. Locate the
CodeAction.Create invocations in class AL1500AddMissingCasesCodeFixProvider and
replace the current nameof(CodeFixResources.AL1500CodeFixTitle) equivalenceKey
argument with Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId for both code
actions so they share the stable identifier.

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(Al1503NormalizeWhitespaceCodeFixProvider))]
[Shared]
public sealed partial class Al0121NormalizeWhitespaceCodeFixProvider : CodeFixProvider {
public sealed partial class Al1503NormalizeWhitespaceCodeFixProvider : CodeFixProvider {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Adopt AlCodeFixProvider<TNode> for AL code-fix implementations.

This provider still derives from CodeFixProvider; AL code-fix files in this folder are required to use the AlCodeFixProvider base type.

As per coding guidelines, "src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL*.cs: CodeFixProvider implementations must use the AlCodeFixProvider base class with a generic node type parameter."

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs`
at line 10, The class Al1503NormalizeWhitespaceCodeFixProvider currently
inherits from CodeFixProvider; change its base to the AL-specific generic base
by making it inherit from AlCodeFixProvider<TNode> (replace CodeFixProvider with
AlCodeFixProvider<TNode> and pick the appropriate AL SyntaxNode type used by
this fix), update any constructors/overrides to match the AlCodeFixProvider API
(e.g., constructor signature, RegisterCodeFixesAsync/FixAllProvider overrides if
their signatures differ), and add the necessary using/import for the
AlCodeFixProvider type so the class compiles while preserving the existing class
name Al1503NormalizeWhitespaceCodeFixProvider and its existing members.

Comment on lines 33 to +36
CodeAction.Create(
CodeFixResources.AL0121CodeFixTitle,
CodeFixResources.AL1503CodeFixTitle,
_ => RemoveNormalizeWhitespaceAsync(context.Document, invocation, root),
nameof(CodeFixResources.AL0121CodeFixTitle)),
nameof(CodeFixResources.AL1503CodeFixTitle)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify equivalenceKey usage in AL code fix providers.
rg -n --type=cs 'CodeAction\.Create\(' src/ANcpLua.Analyzers.CodeFixes/CodeFixes \
  | sed -n '1,200p'
rg -n --type=cs 'nameof\(CodeFixResources\.AL[0-9]{4}CodeFixTitle\)' src/ANcpLua.Analyzers.CodeFixes/CodeFixes

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5381


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect the AL1503 code fix provider class declaration and the specific CodeAction.Create call region.
FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs"
echo "=== $FILE (head 120) ==="
wc -l "$FILE"
sed -n '1,120p' "$FILE"
echo
echo "=== $FILE (around CodeAction.Create usage) ==="
# Print around the lines containing CodeAction.Create in this file.
rg -n --type=cs "CodeAction\.Create\(" "$FILE"
LINE=$(rg -n --type=cs "CodeAction\.Create\(" "$FILE" | head -n1 | cut -d: -f1)
START=$((LINE-15))
END=$((LINE+25))
sed -n "${START},${END}p" "$FILE"

# 2) Find how other AL code fix providers build equivalenceKey: look for CodeAction.Create third argument usage.
echo
echo "=== Files using nameof(CodeFixResources.ALXXXXCodeFixTitle) as equivalenceKey ==="
rg -n --type=cs "CodeAction\.Create\([^;]*nameof\(CodeFixResources\.AL[0-9]{4}CodeFixTitle\)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

echo
echo "=== Files using DiagnosticId as equivalenceKey (look for DiagnosticId in CodeAction.Create args) ==="
rg -n --type=cs "CodeAction\.Create\([^;]*DiagnosticId" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

# 3) Inspect AlCodeFixProvider base class usage in this repo (what do AL code fix providers typically inherit from?)
echo
echo "=== Base class inheritance for AL code fix providers ==="
rg -n --type=cs "class (AL[0-9]{4}[A-Za-z0-9_]*CodeFixProvider|.*CodeFixProvider).*:.*AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true
rg -n --type=cs "class (AL[0-9]{4}[A-Za-z0-9_]*CodeFixProvider|.*CodeFixProvider).*:.*CodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true

# 4) Print AlCodeFixProvider definition (to confirm generic node parameter expectation and how equivalenceKey is meant to be set).
BASE_FILE=$(fd -a "AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes | head -n 20 || true)
echo
echo "AlCodeFixProvider file candidates:"
echo "$BASE_FILE"
for f in $BASE_FILE; do
  echo "=== $f (head 200) ==="
  sed -n '1,200p' "$f"
done

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5662


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect the AL1503 code fix provider class declaration and the specific CodeAction.Create call region.
FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs"
echo "=== $FILE (head 120) ==="
wc -l "$FILE"
sed -n '1,120p' "$FILE"
echo
echo "=== $FILE (around CodeAction.Create usage) ==="
# Print around the lines containing CodeAction.Create in this file.
rg -n --type=cs "CodeAction\.Create\(" "$FILE"
LINE=$(rg -n --type=cs "CodeAction\.Create\(" "$FILE" | head -n1 | cut -d: -f1)
START=$((LINE-15))
END=$((LINE+25))
sed -n "${START},${END}p" "$FILE"

# 2) Find how other AL code fix providers build equivalenceKey: look for CodeAction.Create third argument usage.
echo
echo "=== Files using nameof(CodeFixResources.ALXXXXCodeFixTitle) as equivalenceKey ==="
rg -n --type=cs "CodeAction\.Create\([^;]*nameof\(CodeFixResources\.AL[0-9]{4}CodeFixTitle\)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

echo
echo "=== Files using DiagnosticId as equivalenceKey (look for DiagnosticId in CodeAction.Create args) ==="
rg -n --type=cs "CodeAction\.Create\([^;]*DiagnosticId" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

# 3) Inspect AlCodeFixProvider base class usage in this repo (what do AL code fix providers typically inherit from?)
echo
echo "=== Base class inheritance for AL code fix providers ==="
rg -n --type=cs "class .*:.*AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true
rg -n --type=cs "class .*:.*CodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true

# 4) Print AlCodeFixProvider definition (to confirm generic node parameter expectation and how equivalenceKey is meant to be set).
BASE_FILE=$(fd -a "AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes | head -n 20 || true)
echo
echo "AlCodeFixProvider file candidates:"
echo "$BASE_FILE"
for f in $BASE_FILE; do
  echo "=== $f (head 200) ==="
  sed -n '1,200p' "$f"
done

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5662


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect the AL1503 code fix provider class declaration and the specific CodeAction.Create call region.
FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs"
echo "=== $FILE (head 120) ==="
wc -l "$FILE"
sed -n '1,120p' "$FILE"
echo
echo "=== $FILE (around CodeAction.Create usage) ==="
# Print around the lines containing CodeAction.Create in this file.
rg -n --type=cs "CodeAction\.Create\(" "$FILE"
LINE=$(rg -n --type=cs "CodeAction\.Create\(" "$FILE" | head -n1 | cut -d: -f1)
START=$((LINE-15))
END=$((LINE+25))
sed -n "${START},${END}p" "$FILE"

# 2) Find how other AL code fix providers build equivalenceKey: look for CodeAction.Create third argument usage.
echo
echo "=== Files using nameof(CodeFixResources.ALXXXXCodeFixTitle) as equivalenceKey ==="
rg -n --type=cs "CodeAction\.Create\([^;]*nameof\(CodeFixResources\.AL[0-9]{4}CodeFixTitle\)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

echo
echo "=== Files using DiagnosticId as equivalenceKey (look for DiagnosticId in CodeAction.Create args) ==="
rg -n --type=cs "CodeAction\.Create\([^;]*DiagnosticId" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

# 3) Inspect AlCodeFixProvider base class usage in this repo (what do AL code fix providers typically inherit from?)
echo
echo "=== Base class inheritance for AL code fix providers ==="
rg -n --type=cs "class .*:.*AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true
rg -n --type=cs "class .*:.*CodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true

# 4) Print AlCodeFixProvider definition (to confirm generic node parameter expectation and how equivalenceKey is meant to be set).
BASE_FILE=$(fd -a "AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes | head -n 20 || true)
echo
echo "AlCodeFixProvider file candidates:"
echo "$BASE_FILE"
for f in $BASE_FILE; do
  echo "=== $f (head 200) ==="
  sed -n '1,200p' "$f"
done

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5662


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect the AL1503 code fix provider class declaration and the specific CodeAction.Create call region.
FILE="src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs"
echo "=== $FILE (head 120) ==="
wc -l "$FILE"
sed -n '1,120p' "$FILE"
echo
echo "=== $FILE (around CodeAction.Create usage) ==="
rg -n --type=cs "CodeAction\.Create\(" "$FILE"
LINE=$(rg -n --type=cs "CodeAction\.Create\(" "$FILE" | head -n1 | cut -d: -f1)
START=$((LINE-15))
END=$((LINE+25))
sed -n "${START},${END}p" "$FILE"

# 2) Find how other AL code fix providers build equivalenceKey: look for CodeAction.Create third argument usage.
echo
echo "=== Files using nameof(CodeFixResources.ALXXXXCodeFixTitle) as equivalenceKey ==="
rg -n --type=cs "CodeAction\.Create\([^;]*nameof\(CodeFixResources\.AL[0-9]{4}CodeFixTitle\)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

echo
echo "=== Files using DiagnosticId as equivalenceKey (look for DiagnosticId in CodeAction.Create args) ==="
rg -n --type=cs "CodeAction\.Create\([^;]*DiagnosticId" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S

# 3) Inspect AlCodeFixProvider base class usage in this repo (what do AL code fix providers typically inherit from?)
echo
echo "=== Base class inheritance for AL code fix providers ==="
rg -n --type=cs "class .*:.*AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true
rg -n --type=cs "class .*:.*CodeFixProvider" src/ANcpLua.Analyzers.CodeFixes/CodeFixes -S || true

# 4) Print AlCodeFixProvider definition (to confirm generic node parameter expectation and how equivalenceKey is meant to be set).
BASE_FILE=$(fd -a "AlCodeFixProvider" src/ANcpLua.Analyzers.CodeFixes | head -n 20 || true)
echo
echo "AlCodeFixProvider file candidates:"
echo "$BASE_FILE"
for f in $BASE_FILE; do
  echo "=== $f (head 200) ==="
  sed -n '1,200p' "$f"
done

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 5662


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate AlCodeFixProvider definition in the repo (no failure if not found)
fd -a "AlCodeFixProvider" src | head -n 50 || true

# Check whether any AL code fix providers inherit from AlCodeFixProvider<TNode>
rg -n --type=cs ":\s*AlCodeFixProvider<" src/ANcpLua.Analyzers.CodeFixes || true

# List class declarations of CodeFixProvider/AlCodeFixProvider usage in AL code-fix files
rg -n --type=cs "class\s+.*CodeFixProvider\s*:\s*(CodeFixProvider|AlCodeFixProvider)" src/ANcpLua.Analyzers.CodeFixes/CodeFixes || true

# Show a couple representative AL code fix provider files near the inheritance pattern
for f in \
  $(fd -a "AL*CodeFixProvider.cs" src/ANcpLua.Analyzers.CodeFixes/CodeFixes | head -n 10); do
  echo "==== $f ===="
  sed -n '1,80p' "$f"
done

Repository: ANcpLua/ANcpLua.Analyzers

Length of output: 9292


Use AlCodeFixProvider<TNode> in AL1503NormalizeWhitespaceCodeFixProvider
AL1503NormalizeWhitespaceCodeFixProvider inherits CodeFixProvider directly, but src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL*.cs requires all AL code fix providers to use AlCodeFixProvider<TNode> as the base class.

🤖 Prompt for 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.

In
`@src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1503NormalizeWhitespaceCodeFixProvider.cs`
around lines 33 - 36, AL1503NormalizeWhitespaceCodeFixProvider currently
inherits CodeFixProvider directly; change its base to AlCodeFixProvider<TNode>
(using the appropriate syntax and TNode type that matches the analyzed node used
by RemoveNormalizeWhitespaceAsync) so it follows the AL code-fix pattern. Update
the class declaration for AL1503NormalizeWhitespaceCodeFixProvider to inherit
from AlCodeFixProvider<TNode>, ensure constructor and any overrides match the
generic base (adjust method signatures if the base requires an overridden
RegisterCodeFixesAsync or similar), and keep the existing CodeAction.Create call
and RemoveNormalizeWhitespaceAsync method intact but adapted to the generic node
type.

Comment on lines +157 to 159
<data name="AL1217CodeFixTitle" xml:space="preserve">
<value>Use Guard.NotEmpty</value>
</data>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct AL1217 code-fix title to reference GUID validation.

Line 158 currently says Use Guard.NotEmpty, but this rule targets non-empty GUID validation; the title should be Use Guard.NotEmptyGuid to match analyzer intent and avoid misleading users.

As per coding guidelines, Use Guard.NotEmptyGuid for non-empty GUID validation (AL0050).

🤖 Prompt for 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.

In `@src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resx` around lines 157 -
159, Update the resource string AL1217CodeFixTitle so the displayed title
matches the analyzer intent: change the value text from "Use Guard.NotEmpty" to
"Use Guard.NotEmptyGuid" to correctly reference GUID validation (AL0050); locate
the AL1217CodeFixTitle resource entry in CodeFixResources.resx and replace the
value accordingly.

Comment on lines +57 to +58
public sealed partial class Al1011PortableFormCodeFixTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer
, Al1011NormalizeNullGuardStyleCodeFixProvider> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix generic type argument comma placement to satisfy style analyzers.

These declarations place , on the next line before the second type argument, which violates your formatting rules and can fail analyzer checks.

Suggested diff
-public sealed partial class Al1011PortableFormCodeFixTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer
-    , Al1011NormalizeNullGuardStyleCodeFixProvider> {
+public sealed partial class Al1011PortableFormCodeFixTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
+    Al1011NormalizeNullGuardStyleCodeFixProvider> {

-public sealed partial class Al1011BclFormCodeFixTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
-    Al1011NormalizeNullGuardStyleCodeFixProvider> {
+public sealed partial class Al1011BclFormCodeFixTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
+    Al1011NormalizeNullGuardStyleCodeFixProvider> {

-public sealed partial class Al1011MultiTargetTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
-    Al1011NormalizeNullGuardStyleCodeFixProvider> {
+public sealed partial class Al1011MultiTargetTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
+    Al1011NormalizeNullGuardStyleCodeFixProvider> {

-public sealed partial class Al1011EdgeCasesTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
-    Al1011NormalizeNullGuardStyleCodeFixProvider> {
+public sealed partial class Al1011EdgeCasesTests : CodeFixTestWithEditorConfig<Al1011NormalizeNullGuardStyleAnalyzer,
+    Al1011NormalizeNullGuardStyleCodeFixProvider> {

As per coding guidelines: "Comma should be on the same line as previous parameter (SA1113)" and "Parameter should follow comma (SA1115)".

Also applies to: 301-302, 508-509, 655-656

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/AL1011NormalizeNullGuardStyleTests.cs` around
lines 57 - 58, The generic type argument list in the class declaration
Al1011PortableFormCodeFixTests splits the comma onto the next line before the
second type argument; update the declaration so the comma follows the first type
argument on the same line (e.g., "Al1011NormalizeNullGuardStyleAnalyzer,
Al1011NormalizeNullGuardStyleCodeFixProvider") to satisfy SA1113/SA1115; apply
the same fix to the other occurrences mentioned (the other class/generic
declarations around the noted lines).

Comment on lines +7 to +9
/// Tests for AL1214: Use Guard.NotZero instead of if (x == 0) throw ArgumentOutOfRangeException.
/// </summary>
public sealed partial class Al0047UseGuardNotZeroTests : AnalyzerTest<Al0047UseGuardNotZeroAnalyzer> {
public sealed partial class Al1214UseGuardNotZeroTests : AnalyzerTest<Al1214UseGuardNotZeroAnalyzer> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the required AnalyzerTestBase alias instead of inheriting AnalyzerTest<T> directly.

This test class is still using AnalyzerTest<Al1214UseGuardNotZeroAnalyzer> directly; switch to the repository’s AnalyzerTestBase alias pattern for AL* tests.

Proposed fix
+using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<ANcpLua.Analyzers.Analyzers.Al1214UseGuardNotZeroAnalyzer>;
 using ANcpLua.Analyzers.Analyzers;
 using ANcpLua.Roslyn.Utilities.Testing;
@@
-public sealed partial class Al1214UseGuardNotZeroTests : AnalyzerTest<Al1214UseGuardNotZeroAnalyzer> {
+public sealed partial class Al1214UseGuardNotZeroTests : AnalyzerTestBase {

As per coding guidelines tests/ANcpLua.Analyzers.Tests/AL*Tests.cs: “Analyzer tests must inherit from AnalyzerTestBase alias (typed to the specific analyzer) and use sealed partial class modifiers.”

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/AL1214UseGuardNotZeroTests.cs` around lines 7 -
9, The test class Al1214UseGuardNotZeroTests currently inherits from
AnalyzerTest<Al1214UseGuardNotZeroAnalyzer>; change its base to the repository's
AnalyzerTestBase alias typed to the analyzer (i.e.
AnalyzerTestBase<Al1214UseGuardNotZeroAnalyzer>) while keeping the sealed
partial class modifiers so the class signature reads as a sealed partial class
using the AnalyzerTestBase alias.

/// Tests for AL1404: [AotSafe] code must not call [AotUnsafe] code.
/// </summary>
public sealed partial class Al0052AotSafeCallsAotUnsafeTests : AnalyzerTest<Al0052AotSafeCallsAotUnsafeAnalyzer> {
public sealed partial class Al1404AotSafeCallsAotUnsafeTests : AnalyzerTest<Al1404AotSafeCallsAotUnsafeAnalyzer> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use the typed AnalyzerTestBase alias instead of direct generic inheritance.

Align this analyzer test with the AL*Tests convention by inheriting from the file-local typed alias.

Suggested patch
 using ANcpLua.Analyzers.Analyzers;
 using ANcpLua.Roslyn.Utilities.Testing;
+using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<Al1404AotSafeCallsAotUnsafeAnalyzer>;
@@
-public sealed partial class Al1404AotSafeCallsAotUnsafeTests : AnalyzerTest<Al1404AotSafeCallsAotUnsafeAnalyzer> {
+public sealed partial class Al1404AotSafeCallsAotUnsafeTests : AnalyzerTestBase {

As per coding guidelines, tests/ANcpLua.Analyzers.Tests/AL*Tests.cs: Analyzer tests must inherit from AnalyzerTestBase alias (typed to the specific analyzer) and use sealed partial class modifiers.

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/AL1404AotSafeCallsAotUnsafeTests.cs` at line 9,
The test class Al1404AotSafeCallsAotUnsafeTests currently inherits directly from
AnalyzerTest<Al1404AotSafeCallsAotUnsafeAnalyzer>; change it to use the
file-local typed alias AnalyzerTestBase (typed to
Al1404AotSafeCallsAotUnsafeAnalyzer) so the class becomes sealed partial class
Al1404AotSafeCallsAotUnsafeTests : AnalyzerTestBase; locate the class
declaration and replace the generic base type with the alias while keeping the
sealed partial modifiers.

Comment on lines +10 to +11
public sealed partial class Al1703UseImplicitTypeWhenApparentTests
: AnalyzerTest<Al1703UseImplicitTypeWhenApparentAnalyzer> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the required AnalyzerTestBase alias for this analyzer test class.

Line 11 inherits AnalyzerTest<...> directly; this test file pattern requires the typed alias.

Suggested patch
+using AnalyzerTestBase = ANcpLua.Roslyn.Utilities.Testing.AnalyzerTest<ANcpLua.Analyzers.Analyzers.Al1703UseImplicitTypeWhenApparentAnalyzer>;
 using ANcpLua.Analyzers.Analyzers;
 using ANcpLua.Analyzers.CodeFixes.CodeFixes;
 using ANcpLua.Roslyn.Utilities.Testing;
@@
 public sealed partial class Al1703UseImplicitTypeWhenApparentTests
-    : AnalyzerTest<Al1703UseImplicitTypeWhenApparentAnalyzer> {
+    : AnalyzerTestBase {

As per coding guidelines, tests/ANcpLua.Analyzers.Tests/AL*Tests.cs: Analyzer tests must inherit from AnalyzerTestBase alias (typed to the specific analyzer) and use sealed partial class modifiers.

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/AL1703UseImplicitTypeWhenApparentTests.cs`
around lines 10 - 11, The test class Al1703UseImplicitTypeWhenApparentTests
currently inherits AnalyzerTest<Al1703UseImplicitTypeWhenApparentAnalyzer>;
update the inheritance to use the required typed alias AnalyzerTestBase by
changing the base to AnalyzerTestBase<Al1703UseImplicitTypeWhenApparentAnalyzer>
so the sealed partial class follows the analyzer test pattern.

|---------------------|----------------------------------------|
| `[|code|]` | Expected diagnostic at this location |
| `{|AL0001:code|}` | Expected specific diagnostic ID |
| `{|AL1000:code|}` | Expected specific diagnostic ID |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Escape the diagnostic marker pipes in the table cell.

Line 75 currently breaks Markdown table parsing (MD056); escape the | characters or encode them so the row stays two columns.

Proposed fix
-| `{|AL1000:code|}`   | Expected specific diagnostic ID        |
+| `{&`#124`;AL1000:code&`#124`;}` | Expected specific diagnostic ID |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `{|AL1000:code|}` | Expected specific diagnostic ID |
| `{&`#124`;AL1000:code&`#124`;}` | Expected specific diagnostic ID |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 75-75: Table column count
Expected: 2; Actual: 4; Too many cells, extra data will be missing

(MD056, table-column-count)

🤖 Prompt for 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.

In `@tests/ANcpLua.Analyzers.Tests/CLAUDE.md` at line 75, The table row breaks
Markdown parsing because the diagnostic marker `{|AL1000:code|}` contains
unescaped pipe characters; fix by escaping the pipes inside that cell (e.g.,
replace `{|AL1000:code|}` with `{&`#124`;AL1000:code&`#124`;}` or
`{\\|AL1000:code\\|}`) so the row remains two columns and MD056 is resolved.

@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

  • thread Oc6EhFBM from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhFBP from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhJ1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Add fenced-code language id

  • thread Oc6EhJ1h from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use the analyzer Diagnostic

  • thread Oc6EhJ1m from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Adopt `AlCodeFixPro

  • thread Oc6EhJ1p from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EhJ1z from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Correct AL1217 code-fix tit

  • thread Oc6EhJ14 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Inherit from `AlAna

  • thread Oc6EhJ18 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Move this analyzer

  • thread Oc6EhJ1_ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Use the typed `Analyze

  • thread Oc6EhJ2F from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Fix generic type argument c

  • thread Oc6EhJ2J from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use the required `AnalyzerT

  • thread Oc6EhJ2O from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Use the typed `Analyze

  • thread Oc6EhJ2T from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Use the required `AnalyzerT

  • thread Oc6EhJ2X from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Escape the diagnostic marke

Threads marked needs-human stay unresolved and block auto-merge.

1 similar comment
@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

  • thread Oc6EeXH6 from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Since the AlAnalyzer.HelpLink for

  • thread Oc6EeXH- from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Nitpick: Update diagnostic ID wildcards, cla

  • thread Oc6Efsyu from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

    🧩 Analysi

  • thread Oc6Efsyy from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift **Cross-repo publish order

  • thread Oc6Efsy3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszC from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should be

  • thread Oc6EfszF from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EfszL from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Align provider with

  • thread Oc6EfszQ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **FixAll equivalenceKey

  • thread Oc6EfszT from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should use

  • thread Oc6EfszW from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **Fix CodeAction contract

  • thread Oc6Efszd from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efszj from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key must

  • thread Oc6Efszs from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efszw from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Provider base type

  • thread Oc6Efszx from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId a

  • thread Oc6Efsz0 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Code fix provider s

  • thread Oc6Efsz3 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Both code actions need anal

  • thread Oc6Efsz5 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Replace provider-name equiv

  • thread Oc6Efsz8 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Equivalence key should be `

  • thread Oc6Efsz- from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalence key to `Al1

  • thread Oc6Efs0E from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0L from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0S from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0d from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0l from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs0r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs02 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1A from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win **equivalenceKey must be t

  • thread Oc6Efs1I from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1R from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Set equivalenceKey to the

  • thread Oc6Efs1W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll equivalence key shou

  • thread Oc6Efs1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use analyzer DiagnosticId

  • thread Oc6Efs1r from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey should tra

  • thread Oc6Efs15 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **FixAll key must be analyzer

  • thread Oc6Efs2H from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Incorrect equivalenceKey

  • thread Oc6Efs2M from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Align code action `equivale

  • thread Oc6Efs2W from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2c from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2k from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs2x from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **equivalenceKey must use the

  • thread Oc6Efs26 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🧹 Nitpick | 🔵 Trivial | 🏗️ Heavy lift **Coordinate Version.props updat

  • thread Oc6EhFBM from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhFBP from @chatgpt-codex-connector: needs-human — no rule matched — keeping blocked for manual review

    **P1 Badge

  • thread Oc6EhJ1e from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Add fenced-code language id

  • thread Oc6EhJ1h from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use the analyzer Diagnostic

  • thread Oc6EhJ1m from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Adopt `AlCodeFixPro

  • thread Oc6EhJ1p from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

    🧩 Analysi

  • thread Oc6EhJ1z from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Correct AL1217 code-fix tit

  • thread Oc6EhJ14 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Inherit from `AlAna

  • thread Oc6EhJ18 from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift **Move this analyzer

  • thread Oc6EhJ1_ from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Use the typed `Analyze

  • thread Oc6EhJ2F from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Fix generic type argument c

  • thread Oc6EhJ2J from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟠 Major | ⚡ Quick win **Use the required `AnalyzerT

  • thread Oc6EhJ2O from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win **Use the typed `Analyze

  • thread Oc6EhJ2T from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Use the required `AnalyzerT

  • thread Oc6EhJ2X from @coderabbitai: needs-human — no rule matched — keeping blocked for manual review

    ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win **Escape the diagnostic marke

Threads marked needs-human stay unresolved and block auto-merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Reverted ANcpLuaAnalyzersVersion to 1.29.4 so restore-time package references stay on the last published analyzer package until 2.0.0 is actually available. Version.propsL60-L63
  • Added missing AL1010CodeFixTitle to CodeFixResources.resx with value Convert to pattern matching. src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resxL82-L84
  • Added the corresponding strongly-typed AL1010CodeFixTitle property in CodeFixResources.Designer.cs so CodeFixResources.AL1010CodeFixTitle resolves at compile time. src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.Designer.csL78-L82
  • Committed on current branch as 9d76ecb and recorded PR metadata via make_pr (title: fix(pr-174): restore pre-publish analyzer pin and add AL1010 code-fix resource).

Testing

  • rg -n "ANcpLuaAnalyzersVersion|AL1010CodeFixTitle" Version.props src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.resx src/ANcpLua.Analyzers.CodeFixes/CodeFixResources.Designer.cs
  • ⚠️ dotnet build ANcpLua.Analyzers.slnx -c Release (not run; dotnet is unavailable in this environment)

View task →

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • ⚠️ dotnet build ANcpLua.Analyzers.slnx -c Release (not run here; dotnet SDK is unavailable in this environment).

View task →

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

Blocking fixes to land now

  1. HelpLink bug (Codacy Oc6EeXH6)
  • AL1602 uses the base URL instead of the per‑ID link. Change to HelpLink(DiagnosticId).

Diff:

--- a/src/ANcpLua.Analyzers/Analyzers/AL1602UndefinedVersionVariableAnalyzer.cs
+++ b/src/ANcpLua.Analyzers/Analyzers/AL1602UndefinedVersionVariableAnalyzer.cs
@@ -52,7 +52,7 @@ public sealed partial class Al1602UndefinedVersionVariableAnalyzer : AlAnalyzer {
     private static readonly DiagnosticDescriptor s_rule = new(
         DiagnosticId, s_title, s_messageFormat, DiagnosticCategories.VersionManagement,
-        DiagnosticSeverity.Warning, true, s_description,
-        AlAnalyzer.HelpLinkBase,
+        DiagnosticSeverity.Warning, true, s_description,
+        AlAnalyzer.HelpLink(DiagnosticId),
         WellKnownDiagnosticTags.CompilationEnd);
  1. Diagnostic ID wildcards (Codacy Oc6EeXH-)
  • Ensure all analyzer ranges in .editorconfig use AL1xxx, not AL0xxx. If the repo has no root .editorconfig, update the one that ships with the SDK (Analyzer.ANcpLua.Analyzers.editorconfig) accordingly. Example patterns:
  • Replace e.g. dotnet_diagnostic.AL0001.severity or ranges AL0001-AL0139 with AL1000-AL1899 (and per‑band ranges you actually enforce).

Example snippet to apply where appropriate:

# Correctness band
dotnet_diagnostic.AL1000.severity = error
# ...
# Style band
dotnet_diagnostic.AL1700.severity = warning

EquivalenceKey hygiene (CodeRabbit threads)

  • Current state from grep:

    • No providers still pass nameof(Provider) as the key.
    • AL1700 FixAll path uses diagnostic.Id (correct).
    • Multi‑action providers (e.g., AL1203) should use deterministic variant suffixes (AL1203:IsMethodNamed, AL1203:TryGetConstantValue). Verify you kept this pattern.
  • Optional but recommended: add stable equivalenceKey to refactorings (AR0001/AR0002). Not blocking, but it prevents dedup flakiness.

Diffs:

--- a/src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0001SnakeCaseToPascalCaseRefactoring.cs
+++ b/src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0001SnakeCaseToPascalCaseRefactoring.cs
@@ -55,8 +55,9 @@ public sealed partial class Ar0001SnakeCaseToPascalCaseRefactoring : CodeRefacto
-        context.RegisterRefactoring(CodeAction.Create(
-            CodeFixResources.AR0001RefactoringTitle,
-            ct => RenameAsync(document, identifierToken, pascalCase, ct)));
+        context.RegisterRefactoring(CodeAction.Create(
+            CodeFixResources.AR0001RefactoringTitle,
+            ct => RenameAsync(document, identifierToken, pascalCase, ct),
+            equivalenceKey: "AR0001"));
--- a/src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0002MakeStaticLambdaRefactoring.cs
+++ b/src/ANcpLua.Analyzers.CodeFixes/Refactorings/AR0002MakeStaticLambdaRefactoring.cs
@@ -41,9 +41,10 @@ public sealed partial class Ar0002MakeStaticLambdaRefactoring : CodeRefactoringProvider {
-        context.RegisterRefactoring(
-            CodeAction.Create(
-                "Make lambda static",
-                ct => MakeStaticAsync(document, span, ct)));
+        context.RegisterRefactoring(
+            CodeAction.Create(
+                "Make lambda static",
+                ct => MakeStaticAsync(document, span, ct),
+                equivalenceKey: "AR0002"));

@@
-        context.RegisterRefactoring(
-            CodeAction.Create(
-                "Make all lambdas static in file",
-                ct => MakeAllStaticInFileAsync(document, ct)));
+        context.RegisterRefactoring(
+            CodeAction.Create(
+                "Make all lambdas static in file",
+                ct => MakeAllStaticInFileAsync(document, ct),
+                equivalenceKey: "AR0002:File"));

@@
-        context.RegisterRefactoring(
-            CodeAction.Create(
-                "Make all lambdas static in project",
-                ct => MakeAllStaticInProjectAsync(document.Project, ct)));
+        context.RegisterRefactoring(
+            CodeAction.Create(
+                "Make all lambdas static in project",
+                ct => MakeAllStaticInProjectAsync(document.Project, ct),
+                equivalenceKey: "AR0002:Project"));

@@
-        context.RegisterRefactoring(
-            CodeAction.Create(
-                "Make all lambdas static in solution",
-                ct => MakeAllStaticInSolutionAsync(document.Project.Solution, ct)));
+        context.RegisterRefactoring(
+            CodeAction.Create(
+                "Make all lambdas static in solution",
+                ct => MakeAllStaticInSolutionAsync(document.Project.Solution, ct),
+                equivalenceKey: "AR0002:Solution"));

How to close the blocking threads

  • Codacy (2 nits)

    • Oc6EeXH6 (HelpLink): “Fixed — use AlAnalyzer.HelpLink(DiagnosticId) for AL1602. See latest commit.”
    • Oc6EeXH- (wildcards): “Updated editorconfig analyzer IDs to AL1xxx ranges to match 2.0.0 renumber.”
  • CodeRabbit “equivalenceKey” threads

    • Reply: “Normalized to analyzer DiagnosticId (and DiagnosticId:Variant for multi‑action providers). AL1700 FixAll keys also use diagnostic.Id.” If you accept the optional refactoring keys, add: “Refactorings now carry stable equivalence keys.”

Optional one‑shot local verification before replying

  • Multi‑line sweep for explicit third-arg keys:
    • rg -nPU '(?s)CodeAction.Create([^)],[^)],\s*(diagnostic.Id|Al\d{4}.*Analyzer.DiagnosticId|${Al\d{4}.*Analyzer.DiagnosticId})'
  • Ensure no provider‑name keys remain:
    • rg -nP 'CodeAction.Create([^,]+,[^,]+,\s*nameof(' src/ANcpLua.Analyzers.CodeFixes

Post‑merge (non‑blocking here, but required for consumers)

  • Update ANcpLua.NET.Sdk’s shipped Analyzer.ANcpLua.Analyzers.editorconfig to AL1xxx keys and bump ANcpLuaAnalyzersVersion to 2.0.0.
  • Sweep consumer repos’ NoWarn/editorconfig/tests using eng/analyzer-renumber-plan.md mapping and bump pins to 2.0.0.

If you want, I can prep a tiny PR patch with just the AL1602 HelpLink fix (and the optional refactoring equivalence keys).

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@ANcpLua

Blocking items to land this PR

  1. Fix CodeAction equivalenceKey across code fixes (missing or wrong)
  • Current state:
    • Most providers call CodeAction.Create(title, create) with no equivalenceKey.
    • AL1500AddMissingCasesCodeFixProvider uses nameof(CodeFixResources.AL1500CodeFixTitle) as the key (Line 31).
    • Multi-action providers (AL1202, AL1203) don’t use variant-stable keys.
  • Required contract:
    • Use the analyzer DiagnosticId as equivalenceKey.
    • When a provider offers multiple distinct actions, append a deterministic suffix DiagnosticId:Variant.

Concrete edits to apply now

  • Single-action providers: add analyzer DiagnosticId as 3rd arg.
    Files from scan (non-exhaustive, all showed 2-arg Create):

    • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1001SimplifyNegatedPatternCodeFixProvider.cs
    • AL1003SpanPatternMatchingCodeFixProvider.cs
    • AL1004UseSequenceEqualCodeFixProvider.cs
    • AL1007IXmlSerializableCodeFixProvider.cs
    • AL1009LockTypeCodeFixProvider.cs
    • AL1010PatternMatchingCodeFixProvider.cs
    • AL1011NormalizeNullGuardStyleCodeFixProvider.cs → add stable variant suffix based on style (see below)
    • AL1012CombineDeclarationWithNullCheckCodeFixProvider.cs
    • AL1200UseIsEqualToCodeFixProvider.cs
    • AL1201UseHasAttributeCodeFixProvider.cs
    • AL1204UseOrEmptyCodeFixProvider.cs
    • AL1205UseToImmutableArrayOrEmptyCodeFixProvider.cs
    • AL1206UseWhereNotNullCodeFixProvider.cs
    • AL1207UseToDisplayStringExtensionsCodeFixProvider.cs
    • AL1208UseGuardNotNullCodeFixProvider.cs
    • AL1209UseTryParseExtensionsCodeFixProvider.cs
    • AL1210UseStringComparisonExtensionsCodeFixProvider.cs
    • AL1211UseAttributeExtensionsCodeFixProvider.cs
    • AL1212UseGuardNotNullOrEmptyCodeFixProvider.cs
    • AL1213UseGuardNotNullOrWhiteSpaceCodeFixProvider.cs
    • AL1214UseGuardNotZeroCodeFixProvider.cs
    • AL1215UseGuardNotNegativeCodeFixProvider.cs
    • AL1216UseGuardPositiveCodeFixProvider.cs
    • AL1217UseGuardNotEmptyGuidCodeFixProvider.cs
    • AL1218UseGuardDefinedEnumCodeFixProvider.cs
    • AL1313CancellationTokenPropagationCodeFixProvider.cs
    • AL1314UseExplicitMidpointRoundingCodeFixProvider.cs
    • AL1503NormalizeWhitespaceCodeFixProvider.cs
    • AL1504DuckDbTableCodeFixProvider.cs
    • AL1700StaticLambdaCodeFixProvider.cs
    • AL1701DateTimeNowCodeFixProvider.cs
    • AL1702UseSystemTextJsonCodeFixProvider.cs
    • AL1703UseImplicitTypeWhenApparentCodeFixProvider.cs

    Example (pattern to apply everywhere):

    • Before:
      CodeAction.Create(
      CodeFixResources.AL1212CodeFixTitle,
      _ => ConvertToGuardNotNullOrEmpty(document, ifStatement, root))
    • After:
      CodeAction.Create(
      CodeFixResources.AL1212CodeFixTitle,
      _ => ConvertToGuardNotNullOrEmpty(document, ifStatement, root),
      Al1212UseGuardNotNullOrEmptyAnalyzer.DiagnosticId)
  • Multi-action providers: add variant suffixes to disambiguate actions.

    • src/…/AL1202UseTypeHierarchyCodeFixProvider.cs
      • Implements: $"{Al1202UseTypeHierarchyAnalyzer.DiagnosticId}:Implements"
      • InheritsFrom: $"{Al1202UseTypeHierarchyAnalyzer.DiagnosticId}:InheritsFrom"
    • src/…/AL1203UseOperationExtensionsCodeFixProvider.cs
      • IsMethodNamed: $"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:IsMethodNamed"
      • TryGetConstantValue: $"{Al1203UseOperationExtensionsAnalyzer.DiagnosticId}:TryGetConstantValue"
    • src/…/AL1011NormalizeNullGuardStyleCodeFixProvider.cs
      • Use the computed style as suffix, e.g. $"{Al1011NormalizeNullGuardStyleAnalyzer.DiagnosticId}:{style}"
  • AL1500 (two distinct actions): replace provider/title-based key with DiagnosticId:Variant
    File: src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL1500AddMissingCasesCodeFixProvider.cs

    • SwitchExpressionSyntax:
      CodeAction.Create(CodeFixResources.AL1500CodeFixTitle, _ => FixSwitchExpression(...), $"{Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId}:SwitchExpression")
    • SwitchStatementSyntax:
      CodeAction.Create(CodeFixResources.AL1500CodeFixTitle, _ => FixSwitchStatement(...), $"{Al1500ClosedTypeHierarchySwitchAnalyzer.DiagnosticId}:SwitchStatement")
  • AL1700 custom FixAll provider
    File: src/…/AL1700StaticLambdaCodeFixProvider.cs

    • RegisterCodeFix: set equivalenceKey to Al1700PreferStaticLambdaAnalyzer.DiagnosticId.
    • FixAll: keep DocumentBasedFixAllProvider; alignment with per-action key is sufficient for scoping.
  1. Clear the two Codacy “needs-human” nits
  • HelpLink nit:
    • AlAnalyzer.HelpLink(id) constructs https://ancplua.mintlify.app/analyzers/rules/{id}. With the renumber, AL1xxx links are correct; docs site will need new pages or redirects (out of scope for this PR).
    • Reply in thread: “HelpLink builder already emits AL1xxx; docs pages/redirects will be added alongside 2.0.0.”
  • Diagnostic wildcard nit:
    • Ensure remaining config/docs ranges use AL1000–AL1899 (and reserve AL1900–AL1999 as noted). If any AL0xxx ranges persist in repo config, update; the migration plan already calls out removing stale AL0010/12/13 blocks.
    • Reply in thread: “Editorconfig wildcards updated to AL1xxx; legacy AL0xxx blocks were removed. If you see a remaining instance, point at the file/line.”

Optional follow-ups (post-merge, tracked separately)

  • ANcpLua.NET.Sdk: replace shipped Analyzer.ANcpLua.Analyzers.editorconfig keys with AL1xxx; bump ANcpLuaAnalyzersVersion to 2.0.0; sync comments/targets.
  • Consumer repos (Agents, Roslyn.Utilities tests, ErrorOrX, others): swap AL0xxx in NoWarn/editorconfig/test assertions to AL1xxx per eng/analyzer-renumber-plan.md; bump analyzer pins to 2.0.0.

If you want, I’ll open tracking issues in the SDK and top consumer repos once this PR merges.

  • Sweep: add DiagnosticId-based equivalenceKey to all CodeFixProviders and add variant suffixes where needed.

    • Single-action providers (files listed above): add analyzer DiagnosticId as the 3rd arg to CodeAction.Create.
    • Multi-action providers:
      • AL1202UseTypeHierarchyCodeFixProvider: DiagnosticId:Implements and DiagnosticId:InheritsFrom.
      • AL1203UseOperationExtensionsCodeFixProvider: DiagnosticId:IsMethodNamed and DiagnosticId:TryGetConstantValue.
      • AL1011NormalizeNullGuardStyleCodeFixProvider: DiagnosticId:{style}.
    • AL1500AddMissingCasesCodeFixProvider: replace nameof(CodeFixResources.AL1500CodeFixTitle) with DiagnosticId:SwitchExpression / DiagnosticId:SwitchStatement.
    • AL1700StaticLambdaCodeFixProvider: set per-action equivalenceKey to Al1700PreferStaticLambdaAnalyzer.DiagnosticId; keep custom FixAll as-is.
  • Confirm AlAnalyzer.HelpLink(id) points to new AL1xxx slugs; if any hardcoded AL0xxx remains, update.

  • Audit .editorconfig for any AL0xxx wildcards; replace with AL1xxx ranges; ensure removal of dead AL0010/AL0012/AL0013 blocks as per plan.

Would you like me to proceed to generate the exact diffs for each file listed above so you can apply and push them?


The requested changes have been implemented and a pull request has been created: View PR

Commit 2fe348d (CR autofix bot, 2026-05-25) bumped Version.props line
<ANcpLuaAnalyzersVersion> from 1.29.4 -> 2.0.0. That value drives the
SDK's GlobalPackageReference self-injection (the analyzer references
itself as an analyzer via the SDK template). Asking for >= 2.0.0 failed
NU1102 because ANcpLua.Analyzers 2.0.0 doesn't exist on nuget.org yet
(it's the version THIS PR is producing).

CR autofix conflated VersionPrefix (the version BUILT by this PR) with
ANcpLuaAnalyzersVersion (the version CONSUMED for self-injection from
nuget.org) despite the in-file comment on Directory.Build.props warning
against exactly that pattern.

Restore 1.29.4 (last-published) and add an inline INVARIANT comment so
future autofix-style passes can't repeat the mistake. After this PR
publishes 2.0.0 to nuget.org, a follow-up PR can bump this value to
2.0.0 — but never before.

This incident is what got CR uninstalled across the orgs. See
https://github.com/ANcpLua/github-settings-automation/blob/main/qyl-PRD.md
Appendix 3 for the full freeze rationale + re-enable runbook.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@coderabbitai autofix

@claude

claude Bot commented May 25, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@codacy-production

codacy-production Bot commented May 25, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 2083 complexity · 187 duplication

Metric Results
Complexity 2083
Duplication 187

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

…AL1010 resx

The earlier CR autofix commit 5e81267 made two changes that broke the
build after the renumber:

1. AL1201UseHasAttributeCodeFixProvider — switched base class from
   CodeFixProvider to AlCodeFixProvider<InvocationExpressionSyntax>,
   but kept the existing GetFixAllProvider / RegisterCodeFixesAsync
   overrides. The base class has those methods `sealed override`, so
   the result was CS0239 + CS0534. Revert the inheritance to
   CodeFixProvider; the actual refactor to the AL base class is a
   separate non-trivial change (need to implement CreateCodeAction
   and delete the existing overrides) that doesn't belong in a
   build-break-fix PR.

2. AL1010PatternMatchingCodeFixProvider — title argument changed from
   the hardcoded string "Use pattern matching" to
   CodeFixResources.AL1003CodeFixTitle (an unrelated AL1003 resx key).
   A later renumber-aware pass rewrote AL1003 -> AL1010, but the
   AL1010CodeFixTitle resx entry doesn't exist (only AL1009 / AL1011 do).
   Add the AL1010CodeFixTitle resx entry with the original "Use pattern
   matching" text + the matching Designer.cs property.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@coderabbitai autofix

@claude

claude Bot commented May 25, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

@ANcpLua
ANcpLua merged commit 67dc2c5 into main May 25, 2026
10 checks passed
@ANcpLua
ANcpLua deleted the feat/major-renumber branch May 25, 2026 11:53
ANcpLua added a commit that referenced this pull request May 30, 2026
The Shipped manifest was empty while Unshipped held every rule, so the
RS2000 split carried no signal — it claimed nothing had ever shipped.
Commit #174 introduced the AL1xxx domain-band scheme as the 2.0.0
breaking renumber, and v2.0.1 added zero rules, so the entire current
rule set genuinely first shipped in 2.0.0.

- Move all 89 rule rows into AnalyzerReleases.Shipped.md under
  `## Release 2.0.0`; reduce Unshipped to the empty "nothing pending" state.
- Point the generated docs-index manifest line at Shipped (the real
  manifest now) instead of an empty Unshipped file.

Verified: Release build (RS2000 + consistency --check) clean, 758/758 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ANcpLua
ANcpLua restored the feat/major-renumber branch June 13, 2026 13:35
@ANcpLua
ANcpLua deleted the feat/major-renumber branch June 15, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant