feat(sdk): bump AL analyzer pin 1.29.2 → 2.0.0 + bundled editorconfig - #183
Conversation
…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>
|
@coderabbitai autofix |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
⚪ 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.
Triage Bot report
Threads marked |
1 similar comment
Triage Bot report
Threads marked |
There was a problem hiding this comment.
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
ANcpLuaAnalyzersVersionfrom1.29.2to2.0.0. - Rewrite the bundled
Analyzer.ANcpLua.Analyzers.editorconfigto the new AL1000..AL1899 rule IDs. - Update version-enforcement targets and tooling
.editorconfigreferences 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. |
| # 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>
|
@coderabbitai autofix |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Summary
<ANcpLuaAnalyzersVersion>insrc/Build/Common/Version.propsfrom1.29.2→2.0.0(AL renumber, indexed on nuget.org 2026-05-25).src/Config/Analyzer.ANcpLua.Analyzers.editorconfig) for the new AL1000..AL1899 banded IDs — 272 substitutions, pre-staged from theal-qyl-rewirepass.src/Build/Enforcement/VersionEnforcement.targetsfor the Package/version band IDs (AL0017/18/19 → AL1600/01/02).tools/.editorconfig(AL0025 → AL1700).Why this is a breaking-change pull-through
The SDK transitively injects
ANcpLua.Analyzersas an analyzer reference on every consumer csproj viaBuild/Common/GlobalPackages.props. Any consumer with explicit AL severity overrides in their own.editorconfig/.globalconfigwill have stale references after this SDK ships — Stage C3 ofqyl-PRD.mdcovers the consumer-cascade PRs (qyl, ErrorOrX, TourPlanner, ANcpLua.Roslyn.Utilities).Test plan
🤖 Generated with Claude Code