Skip to content
FunCoding

deprecate-analyzer-or-refactoring

Official

Use when obsoleting or retiring RCS####, RR####, or RCF#### in roslynator, replacing an analyzer with another id, or when tempted to use IsObsolete on an Analyzer entry — analyzers use Status Obsolete, not IsObsolete.

Star
3,506
Last commit
Nov 1, 2026

.claude/skills/deprecate-analyzer-or-refactoring/SKILL.md

View on GitHub

Deprecate Analyzer or Refactoring

Overview

Deprecation mechanism differs by artifact type. Wrong choice causes compile errors.

When to Use

  • Superseding an analyzer with another (ObsoleteMessage naming successor)
  • Retiring a rule with no replacement (Status=Disabled for analyzers)
  • Marking refactoring or compiler fix obsolete (IsObsolete="true")

Not for: opt-in analyzers (IsEnabledByDefault=false is not deprecation).

Quick Reference

ArtifactMechanism
Analyzer (default)<Status>Obsolete</Status> + <ObsoleteMessage>
Analyzer (retire)<Status>Disabled</Status> — burns id
Refactoring / RCFIsObsolete="true" on XML element

Full detail: references/mechanisms.md.

Implementation

  1. Update XML (mechanism per artifact — references/mechanisms.md)
  2. cd tools && pwsh ./generate_code.ps1
  3. Remove implementation, registration, and *Tests.cs
  4. Keep the obsolete XML entry — analyzers (Status=Obsolete), refactorings/RCF (IsObsolete="true"). Delete the whole <Analyzer> block only when retiring with Status=Disabled
  5. dotnet build + format verify
  6. CHANGELOG.md under ### Changed

Common Mistakes

MistakeFix
IsObsolete="true" on <Analyzer>Use <Status>Obsolete</Status> + <ObsoleteMessage> — compile error otherwise
Delete entire <Analyzer> block when supersedingKeep obsolete entry; remove implementation/tests only
Status=Disabled with a successorUse Obsolete + ObsoleteMessage
Confuse with IsEnabledByDefault=falseOpt-in is not deprecation
Skip codegen after XML changeDescriptors/options pages stay stale

Similar Skills

rea-analysis-optimization

MOmorluto/rea485k9,215 new stars in the last 7 days

codebase-design

MAmattpocock/skills336k5,004 new stars in the last 7 days

Featured

diagnosing-bugs

Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.

MAmattpocock/skills336k5,004 new stars in the last 7 days

setup-ts-deep-modules

MAmattpocock/skills336k5,004 new stars in the last 7 days

code-review

MAmattpocock/skills336k5,004 new stars in the last 7 days

implement

MAmattpocock/skills336k5,004 new stars in the last 7 days