Skip to content

chore(analyzers): delete 8 obsolete/duplicate analyzers#103

Merged
github-actions[bot] merged 1 commit into
mainfrom
chore/delete-otsc-duplicates
May 5, 2026
Merged

chore(analyzers): delete 8 obsolete/duplicate analyzers#103
github-actions[bot] merged 1 commit into
mainfrom
chore/delete-otsc-duplicates

Conversation

@ANcpLua
Copy link
Copy Markdown
Owner

@ANcpLua ANcpLua commented May 5, 2026

Summary

Delete eight rules from ANcpLua.Analyzers that have been superseded by the dedicated ANcpLua.OpenTelemetry.SemanticConventions.Analyzers package or are dead-by-design. Removes duplicate diagnostic firing for any consumer that references both packages.

What's removed

Rule Why dead
AL0010 isEnabledByDefault: false — never fires unless user opts in.
AL0012 OTel deprecated-attribute detection, fully covered by OTSC0010 + OTSC0012 (symbol-resolved, no hand-curated catalog).
AL0062 Direct duplicate of OTSC0010.
AL0087 Direct duplicate of OTSC0011.
AL0132 Direct duplicate of OTSC0014.
AL0133 Direct duplicate of OTSC0012.
AL0134 Direct duplicate of OTSC0011.
AL0136 Direct duplicate of OTSC0021.

20 files removed total (8 analyzer sources + 3 code-fix providers + 9 tests + AnalyzerReleases entries).

Verification

  • dotnet build src/ANcpLua.Analyzers: 0 warnings, 0 errors
  • dotnet build src/ANcpLua.Analyzers.CodeFixes: 0 warnings, 0 errors
  • dotnet test: 1010 passed, 0 failed (was 1080+ with the deleted tests)

Notes

Resources.resx orphan entries for the deleted IDs were left in place — they generate unused Designer.cs properties but produce no warnings or errors. Separate hygiene pass can clean them.

Test plan

  • All remaining analyzers build clean
  • All remaining tests pass
  • AnalyzerReleases.Unshipped.md no longer references deleted IDs

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Removed eight diagnostic rules (AL0010, AL0012, AL0062, AL0087, AL0132, AL0133, AL0134, AL0136) and their associated code fixes from the analyzer.

All eight rules have either been superseded by the dedicated
ANcpLua.OpenTelemetry.SemanticConventions.Analyzers package (OTSC* IDs)
or are dead-by-design. Removing them eliminates duplicate diagnostic
firing in qyl and any other consumer that references both packages.

| Removed | Why dead                                                                |
|---------|-------------------------------------------------------------------------|
| AL0010  | isEnabledByDefault: false — never fires unless user explicitly opts in. |
| AL0012  | OTel deprecated-attribute detection, fully covered by OTSC0010 + OTSC0012 (symbol-resolved, no hand-curated catalog). |
| AL0062  | Direct duplicate of OTSC0010 (deprecated SemConv constant).             |
| AL0087  | Direct duplicate of OTSC0011 (literal-vs-typed-constant suggester).     |
| AL0132  | Direct duplicate of OTSC0014 (deprecated SemConv value).                |
| AL0133  | Direct duplicate of OTSC0012 (literal matches deprecated name).         |
| AL0134  | Direct duplicate of OTSC0011.                                           |
| AL0136  | Direct duplicate of OTSC0021 (incubating member in library).            |

Removed 20 files total: 8 analyzer sources, 3 code-fix providers
(AL0010/AL0012/AL0134), 9 test files, plus AnalyzerReleases.Unshipped.md
entries.

Resources.resx orphan entries for the deleted IDs left in place — they
generate unused Designer.cs properties but produce no warnings or errors.
A separate resx hygiene pass can remove them.

Verification:
- dotnet build src/ANcpLua.Analyzers: 0 warnings, 0 errors
- dotnet build src/ANcpLua.Analyzers.CodeFixes: 0 warnings, 0 errors
- dotnet build tests/ANcpLua.Analyzers.Tests: 0 warnings, 0 errors
- dotnet test: 1010 passed, 0 failed (was 1080+ with the 70 deleted tests)

ANcpLua.Analyzers stays the general-purpose .NET analyzer suite;
SemConv-spec rules now live exclusively in the dedicated package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 02:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

@coderabbitai autofix

@github-actions github-actions Bot enabled auto-merge (squash) May 5, 2026 02:38
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e6572b16-defb-4518-80b2-0848d66d98f0

📥 Commits

Reviewing files that changed from the base of the PR and between 195bc59 and ab077b3.

📒 Files selected for processing (21)
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0010PartialTypeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0012DeprecatedAttributeCodeFixProvider.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0134UseSemanticConventionConstantCodeFixProvider.cs
  • src/ANcpLua.Analyzers/AnalyzerReleases.Unshipped.md
  • src/ANcpLua.Analyzers/Analyzers/AL0010PartialTypeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0012DeprecatedAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0062DeprecatedSemconvAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0087PreferConstantAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0132DeprecatedSemconvValueAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0133ContextSensitiveDeprecatedSemconvAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0134UseSemanticConventionConstantAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0136IncubatingSemanticConventionInLibraryAnalyzer.cs
  • tests/ANcpLua.Analyzers.Tests/AL0010PartialTypeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0012DeprecatedAttributeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0062DeprecatedSemconvTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0087PreferConstantAttributeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0132DeprecatedSemconvValueTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0133ContextSensitiveDeprecatedSemconvTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0134UseSemanticConventionConstantCodeFixTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0134UseSemanticConventionConstantTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0136IncubatingSemanticConventionInLibraryTests.cs
💤 Files with no reviewable changes (21)
  • src/ANcpLua.Analyzers/Analyzers/AL0010PartialTypeAnalyzer.cs
  • tests/ANcpLua.Analyzers.Tests/AL0010PartialTypeTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0132DeprecatedSemconvValueTests.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0062DeprecatedSemconvAnalyzer.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0134UseSemanticConventionConstantCodeFixProvider.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0132DeprecatedSemconvValueAnalyzer.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0010PartialTypeCodeFixProvider.cs
  • tests/ANcpLua.Analyzers.Tests/AL0062DeprecatedSemconvTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0134UseSemanticConventionConstantCodeFixTests.cs
  • src/ANcpLua.Analyzers/AnalyzerReleases.Unshipped.md
  • tests/ANcpLua.Analyzers.Tests/AL0087PreferConstantAttributeTests.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0087PreferConstantAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers.CodeFixes/CodeFixes/AL0012DeprecatedAttributeCodeFixProvider.cs
  • tests/ANcpLua.Analyzers.Tests/AL0134UseSemanticConventionConstantTests.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0134UseSemanticConventionConstantAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0136IncubatingSemanticConventionInLibraryAnalyzer.cs
  • tests/ANcpLua.Analyzers.Tests/AL0133ContextSensitiveDeprecatedSemconvTests.cs
  • tests/ANcpLua.Analyzers.Tests/AL0012DeprecatedAttributeTests.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0012DeprecatedAttributeAnalyzer.cs
  • src/ANcpLua.Analyzers/Analyzers/AL0133ContextSensitiveDeprecatedSemconvAnalyzer.cs
  • tests/ANcpLua.Analyzers.Tests/AL0136IncubatingSemanticConventionInLibraryTests.cs
📜 Recent review details
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Agent
  • GitHub Check: build

📝 Walkthrough

Walkthrough

This change removes eight diagnostic analyzer rules and their implementations: AL0010 (PartialType), AL0012 (DeprecatedAttribute), AL0062 (DeprecatedSemconv), AL0087 (PreferConstantAttribute), AL0132 (DeprecatedSemconvValue), AL0133 (ContextSensitiveDeprecatedSemconv), AL0134 (UseSemanticConventionConstant), and AL0136 (IncubatingSemanticConventionInLibrary). Each removal includes the analyzer class, associated code fix provider where applicable, corresponding test files, and entries in AnalyzerReleases.Unshipped.md. Fifteen files deleted across analyzers, code fixes, and tests.

🚥 Pre-merge checks | ✅ 9
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows conventional commits format (chore prefix), is under 72 characters (55 chars), contains no trailing period, and accurately describes the main change: removal of 8 obsolete/duplicate analyzers.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Datetime.Now/Utcnow In Analyzer Code ✅ Passed PR only deletes C# files; no C# files added/modified under src/. Check is not applicable to deletion-only pull requests.
No .Result/.Wait() Blocking Async ✅ Passed This is a removal-only PR with no added or modified C# files. The custom check scans for blocking async patterns in added/modified files only. No such files exist in this PR.
No Isourcegenerator ✅ Passed PR removes 8 analyzers and 3 code fix providers. Zero new ISourceGenerator implementations or [Generator] attributes added. Check requirement satisfied.
No Null-Forgiving Operator Without Justification ✅ Passed PR only deletes files; no C# files are added/modified. Only AnalyzerReleases.Unshipped.md is modified. Check not applicable.
No Isymbol Stored In Incremental Models ✅ Passed PR contains only file deletions (8 analyzers, 3 code-fix providers, 9 tests). No added/modified files with incremental generator code. Check not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

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.

@claude
Copy link
Copy Markdown

claude Bot commented May 5, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown

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

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: ab077b3963

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 17 to 18
AL0011 | Threading | Warning | Al0011LockKeywordAnalyzer
AL0012 | OpenTelemetry | Warning | Al0012DeprecatedAttributeAnalyzer
AL0013 | OpenTelemetry | Info | Al0013MissingSchemaUrlAnalyzer
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 Avoid removing diagnostics from the analyzer package

This change drops AL0010/AL0012 and later IDs from the package’s active release list, which means projects that only consume ANcpLua.Analyzers (including SDK-injected usage) will silently lose those checks after upgrade. The repo guideline in AGENTS.md explicitly calls diagnostic removal a breaking change for consumers, so this should be handled via a compatibility/deprecation path (or coordinated major-version migration) instead of direct removal.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot merged commit a71b982 into main May 5, 2026
25 of 27 checks passed
@ANcpLua ANcpLua review requested due to automatic review settings May 5, 2026 03:01
github-actions Bot pushed a commit that referenced this pull request May 5, 2026
Removes catalog rows for AL0010, AL0012, AL0062, AL0087 and drops
AL0010/AL0012 from the code-fix ID list. Keeps the rest of the
README — diagnostic count and category totals to be reconciled in
a follow-up once the canonical count source is in place.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant