Skip to content

fix(analyzers): IDE1006 s_ prefix + SDK 3.4.16#104

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/ide1006-s_-prefix
May 5, 2026
Merged

fix(analyzers): IDE1006 s_ prefix + SDK 3.4.16#104
github-actions[bot] merged 1 commit into
mainfrom
fix/ide1006-s_-prefix

Conversation

@ANcpLua
Copy link
Copy Markdown
Owner

@ANcpLua ANcpLua commented May 5, 2026

Renames 5 private static fields to s_* per IDE1006 (now error in SDK 3.4.16). Supersedes #100.

Summary by CodeRabbit

  • Chores
    • Updated ANcpLua.NET SDK versions to 3.4.16 (from 3.4.15)
    • Internal code refactoring and improvements to analyzer implementations

Five fields in three files violated IDE1006 (dotnet/runtime convention
`s_camelCase` for private static): SdkTypes, DeprecatedAttributes,
DeprecatedAttributePrefixes, Rule, MatchInvocation. SDK 3.4.16 promotes
IDE1006 to error, so this surfaces as a build break on the renovate bump.
Bundling the rename and the SDK bump in one commit so main lands clean.

Supersedes #100 (Renovate ancplua-sdk → 3.4.16).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 03:36
@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 03:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR updates MSBuild SDK versions from 3.4.15 to 3.4.16 in global.json and refactors static field naming conventions across analyzer classes to use the s_ prefix for internal static readonly fields. Specifically, Rule becomes s_rule, MatchInvocation becomes s_matchInvocation, SdkTypes becomes s_sdkTypes, and deprecated semantic convention lookup dictionaries are renamed to s_deprecatedAttributes and s_deprecatedAttributePrefixes. No logic changes; naming standardization only.

🚥 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 (fix scope), is under 72 chars (46 chars), has no trailing period, and accurately describes the dual purpose: IDE1006 s_ prefix compliance and SDK 3.4.16 upgrade.
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 No DateTime.Now or DateTime.UtcNow usage detected in any modified analyzer files. All changes are field rename refactoring only; no determinism violations introduced.
No .Result/.Wait() Blocking Async ✅ Passed No blocking async patterns (.Result, .Wait(), .GetAwaiter().GetResult()) detected in the three modified C# analyzer files. The PR contains only field renames for IDE1006 compliance.
No Isourcegenerator ✅ Passed No ISourceGenerator or [Generator] patterns found. PR contains only SDK bumps and IDE1006 field renames—no source generator implementations added.
No Null-Forgiving Operator Without Justification ✅ Passed No null-forgiving operators found in modified C# files. Changes are purely field renamings to satisfy IDE1006 naming conventions.
No Isymbol Stored In Incremental Models ✅ Passed No incremental generator code in PR. Changes are field renamings in analyzer classes only, no record/class types with ISymbol/SyntaxNode/Compilation. 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 finished @ANcpLua's task in 1m 41s —— View job


Code Review – PR #104 — ✅ Approved

  • Read PR diff vs origin/main
  • Inspect each changed file
  • Verify rename consistency (no missed call sites)
  • Check global.json SDK bump
  • Build & test — deferred to CI (sandbox blocks dotnet build)
  • Post review verdict

Summary

Mechanical IDE1006 compliance pass to unblock SDK 3.4.16 (where IDE1006 graduates from warning to error). Five private static readonly fields renamed to s_*; no behavior change.

File Renames All call sites updated?
AL0103ClosedTypeHierarchySwitchAnalyzer.cs Rules_rule (3 refs), MatchInvocations_matchInvocation (2 refs)
AL0131DirectGenAiSdkUsageAnalyzer.cs SdkTypess_sdkTypes (1 ref)
OpenTelemetryDeprecatedSemconvCatalog.cs DeprecatedAttributes, DeprecatedAttributePrefixes (2 refs each)
global.json ANcpLua.NET.Sdk{,.Web,.Test} 3.4.15 → 3.4.16 (consistent triple) n/a

Verified via grep -rnE "static readonly [A-Z]" src/ANcpLua.Analyzers/ --include="*.cs" | grep -vE "\bs_[a-z]" — zero hits outside Resources.Designer.cs (auto-generated, excluded by convention). No stray references to the old PascalCase names anywhere in src/ or tests/.

Notes / non-blocking

  • CLAUDE.md's analyzer template (lines 38–48) still shows private static readonly DiagnosticDescriptor Rule = CreateRule(...). After this PR the in-repo convention is s_rule for private fields (and Rule only when public for a CodeFixProvider). Worth a follow-up doc tweak so future analyzers don't regress.
  • Build/tests not run locally — sandbox blocks dotnet build. CI is the authoritative gate; rename is mechanical so risk is low.

Decision-tree outcome: case 3 (clean). Nothing to push.
· Branch

@ANcpLua ANcpLua mentioned this pull request May 5, 2026
1 task
@github-actions github-actions Bot merged commit 4411f8b into main May 5, 2026
15 of 17 checks passed
@ANcpLua ANcpLua review requested due to automatic review settings May 5, 2026 04:00
@ANcpLua ANcpLua deleted the fix/ide1006-s_-prefix branch May 5, 2026 10:01
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