Skip to content

feat(sdk): bump AL analyzer pin 1.29.2 → 2.0.0 + bundled editorconfig - #183

Merged
ANcpLua merged 2 commits into
mainfrom
feat/al-2.0-bundling
May 25, 2026
Merged

feat(sdk): bump AL analyzer pin 1.29.2 → 2.0.0 + bundled editorconfig#183
ANcpLua merged 2 commits into
mainfrom
feat/al-2.0-bundling

Conversation

@ANcpLua

@ANcpLua ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bumps <ANcpLuaAnalyzersVersion> in src/Build/Common/Version.props from 1.29.22.0.0 (AL renumber, indexed on nuget.org 2026-05-25).
  • Rewrites the bundled per-rule severity editorconfig (src/Config/Analyzer.ANcpLua.Analyzers.editorconfig) for the new AL1000..AL1899 banded IDs — 272 substitutions, pre-staged from the al-qyl-rewire pass.
  • 3-line update to src/Build/Enforcement/VersionEnforcement.targets for the Package/version band IDs (AL0017/18/19 → AL1600/01/02).
  • 2-line update to tools/.editorconfig (AL0025 → AL1700).

Why this is a breaking-change pull-through

The SDK transitively injects ANcpLua.Analyzers as an analyzer reference on every consumer csproj via Build/Common/GlobalPackages.props. Any consumer with explicit AL severity overrides in their own .editorconfig / .globalconfig will have stale references after this SDK ships — Stage C3 of qyl-PRD.md covers the consumer-cascade PRs (qyl, ErrorOrX, TourPlanner, ANcpLua.Roslyn.Utilities).

Test plan

  • CI green on this branch (build all targets, tests pass, no AL1xxx-related warnings-as-errors).
  • Bundled editorconfig passes drift-check against canonical (if applicable).
  • Any sample/dogfood projects in this repo build clean against AL 2.0.0.
  • Generator-docs regeneration step (if any) reflects new IDs.

🤖 Generated with Claude Code

…torconfig

AL 2.0.0 published + indexed on nuget.org 2026-05-25 (renumber to
9 domain bands AL1000..AL1899). The SDK transitively injects
ANcpLua.Analyzers as an analyzer to every consumer; the bundled
per-rule severity editorconfig + version enforcement targets must
move in lockstep with the analyzer to keep AL severity overrides
working on consumer projects.

Changes:
- src/Build/Common/Version.props
  ANcpLuaAnalyzersVersion 1.29.2 -> 2.0.0. Added comment block citing
  the AL HEAD sha + index date so the link between SDK pin bump and
  AL release is traceable.
- src/Config/Analyzer.ANcpLua.Analyzers.editorconfig
  272 substitutions from old AL0xxx IDs to new AL1xxx banded IDs.
  Pre-staged from the al-qyl-rewire pass on 2026-05-25.
- src/Build/Enforcement/VersionEnforcement.targets
  3 substitutions: AL0017 -> AL1600, AL0018 -> AL1601, AL0019 -> AL1602.
  These are the version-enforcement rule IDs that the targets check
  against in `Package / version` band.
- tools/.editorconfig
  2 substitutions: AL0025 -> AL1700 (style band).

This is a breaking-change pull-through for any consumer with explicit
AL severity overrides — their .editorconfig / .globalconfig must also
migrate AL0xxx -> AL1xxx (Stage C3 of qyl-PRD covers the consumer
cascade).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 16:37
@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

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 updates the ANcpLua.Analyzers dependency to version 2.0.0 and performs a comprehensive migration of rule IDs to the new AL1xxx format. Codacy results indicate the changes are up to standards.

Key issues to address before merging include restoring the omitted AL0140 (likely AL1704) rule to maintain style consistency and clarifying the discrepancy between the PR description and the actual line changes in the MSBuild targets file. No security-critical flaws were identified.

About this PR

  • The PR description mentions a '3-line update' to VersionEnforcement.targets, but the diff only shows two modifications (a comment update and one error code change). Please verify if a change was accidentally omitted.

Test suggestions

  • Verify that MSBuild correctly triggers error AL1601 when Version.props is not imported.
  • Verify that all migrated rule IDs in the bundled editorconfig map to valid rules in the 2.0.0 analyzer.
  • Verify that the demoted rules (e.g., AL1106, AL1408) correctly report as 'suggestion' during a build.
  • Verify that the SDK builds clean and dogfood projects compile without regression warnings.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that MSBuild correctly triggers error AL1601 when Version.props is not imported.
2. Verify that all migrated rule IDs in the bundled editorconfig map to valid rules in the 2.0.0 analyzer.
3. Verify that the demoted rules (e.g., AL1106, AL1408) correctly report as 'suggestion' during a build.
4. Verify that the SDK builds clean and dogfood projects compile without regression warnings.
Low confidence findings
  • No automated verification or scripts are provided to ensure the correctness of the rule re-mapping. Given the volume of ID changes, consider providing logs or a verification report from a dogfood project build.

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

# that intentionally spell obvious types for readability.
dotnet_diagnostic.AL0139.severity = suggestion
dotnet_diagnostic.AL1703.severity = suggestion

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

Suggestion: It appears that rule AL0140 (likely renumbered to AL1704) was omitted during the version migration. If this was intentional, consider adding a note to the AL1703 block; otherwise, it should be restored to maintain consistent style enforcement.

Try running the following prompt in your IDE agent:

Restore the 'Use explicit type when type is not apparent' rule (previously AL0140) to the 17xx Style category in src/Config/Analyzer.ANcpLua.Analyzers.editorconfig. It should follow AL1703, use suggestion-level severity, and include the rationale from version 1.29.2 regarding top-level statements and minimal APIs.

@ANcpLua

ANcpLua commented May 25, 2026

Copy link
Copy Markdown
Owner Author

Triage Bot report

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

    ⚪ LOW RISK Suggestion: It appears that rule AL0140 (lik

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 ic6ElzuZ from @codacy-production: needs-human — no rule matched — keeping blocked for manual review

    ⚪ LOW RISK Suggestion: It appears that rule AL0140 (lik

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

Copilot AI 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.

Pull request overview

This PR updates the SDK’s pinned ANcpLua.Analyzers version to 2.0.0 and propagates the analyzer rule renumbering (AL0xxx → AL1xxx domain bands) across the bundled analyzer severity configuration and version-enforcement plumbing.

Changes:

  • Bump ANcpLuaAnalyzersVersion from 1.29.2 to 2.0.0.
  • Rewrite the bundled Analyzer.ANcpLua.Analyzers.editorconfig to the new AL1000..AL1899 rule IDs.
  • Update version-enforcement targets and tooling .editorconfig references to the new rule IDs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tools/.editorconfig Updates the static-lambda analyzer rule ID to AL1700 for tooling files.
src/Config/Analyzer.ANcpLua.Analyzers.editorconfig Renumbers and re-bands all bundled analyzer severities to the new AL1xxx rule IDs.
src/Build/Enforcement/VersionEnforcement.targets Updates the enforced diagnostic code/comment from AL0018 to AL1601 for missing Version.props.
src/Build/Common/Version.props Bumps the pinned analyzer package version to 2.0.0 and documents the renumbering context.

Comment thread tools/.editorconfig
Comment on lines +59 to +60
# AL1700: Prefer static lambda (ANcpLua.Analyzers)
dotnet_diagnostic.AL1700.severity = warning No newline at end of file
The ConfigFilesGenerator regenerates this file from the analyzer's
actual ruleset and doesn't emit that header line. The al-qyl-rewire
pass preserved it from the prior hand-edited content, which caused
lint_config CI to fail (generator output differs from committed file
→ exit 1).

Confirmed: 1-line removal, AL1xxx rule body is byte-identical to the
generator output.

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 a952686 into main May 25, 2026
12 checks passed
@ANcpLua
ANcpLua deleted the feat/al-2.0-bundling branch May 25, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants