Skip to content

Add AnalyzerReleases.Shipped.md for DesignPatterns.Analyzers#212

Merged
Skymly merged 1 commit into
mainfrom
fix/analyzer-releases-shipped
Jul 4, 2026
Merged

Add AnalyzerReleases.Shipped.md for DesignPatterns.Analyzers#212
Skymly merged 1 commit into
mainfrom
fix/analyzer-releases-shipped

Conversation

@Skymly

@Skymly Skymly commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Create AnalyzerReleases.Shipped.md for DesignPatterns.Analyzers with the 10 analyzer-shipped rules (DP006, DP023, DP024, DP025, DP033, DP036, DP044, DP060, DP061, DP062) under release 0.2.2.
  • Create a separate AnalyzerReleases.Unshipped.md for the Analyzers project (previously shared SourceGenerators/Unshipped.md with all 62 rules).
  • Suppress RS2003 in DesignPatterns.Analyzers.csproj with an explanatory comment: the release tracking analyzer cannot verify shipped rule IDs because IncludeBuildOutput=false prevents it from reflecting the compiled assembly's SupportedDiagnostics, and the diagnostic descriptors are linked via <Compile Include> rather than a project reference.

Why only DesignPatterns.Analyzers gets a Shipped.md

The Roslyn release tracking analyzer (RS2003/RS2007/RS2008) validates shipped rules by reflecting SupportedDiagnostics from DiagnosticAnalyzer subclasses. This only works for DesignPatterns.Analyzers which defines DiagnosticAnalyzer classes.

DesignPatterns.SourceGenerators uses IIncrementalGenerator — its diagnostics are not registered via SupportedDiagnostics, so the release tracking analyzer cannot validate them. Adding a Shipped.md there triggers RS2003 for every rule. The SourceGenerators and CodeFixes projects continue to use the shared AnalyzerReleases.Unshipped.md (all 62 rules) without a Shipped.md, which is correct because unshipped rules are not validated.

RS2003 suppression

RS2003 is suppressed in DesignPatterns.Analyzers.csproj because the release tracking analyzer cannot resolve the rule IDs at compile time. The Shipped.md file is maintained manually and verified by ensuring entries match DiagnosticIds.cs.

Related Issue

Closes #211

Solution module

  • Analyzers (DesignPatterns.Analyzers/ + DesignPatterns.CodeFixes/)

Type of change

  • Bug fix

Test plan

  • dotnet build DesignPatterns.slnx -c Release — 0 errors, 0 warnings
  • dotnet test DesignPatterns.slnx -c Release --no-build — all 641 tests pass
  • RS2003 suppressed with explanatory comment

Breaking changes

  • None

Create AnalyzerReleases.Shipped.md with the 10 analyzer-shipped rules
(DP006, DP023, DP024, DP025, DP033, DP036, DP044, DP060, DP061, DP062)
under release 0.2.2. Create a separate AnalyzerReleases.Unshipped.md
for the Analyzers project (previously shared SourceGenerators/Unshipped.md).

Suppress RS2003 in DesignPatterns.Analyzers.csproj with an explanatory
comment: the release tracking analyzer cannot verify shipped rule IDs
because IncludeBuildOutput=false prevents it from reflecting the compiled
assembly's SupportedDiagnostics, and the diagnostic descriptors are
linked via <Compile Include> rather than a project reference.

SourceGenerators and CodeFixes continue to use the shared
AnalyzerReleases.Unshipped.md (all 62 rules) without a Shipped.md,
which is correct because IIncrementalGenerator diagnostics are not
registered via SupportedDiagnostics and the release tracking analyzer
does not validate unshipped rules.

Closes #211

@Skymly Skymly left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: PR #212 — AnalyzerReleases.Shipped.md

Clean and correct. A few observations:

What's good

  • Creates AnalyzerReleases.Shipped.md for DesignPatterns.Analyzers with all 10 shipped analyzer rules (DP006, DP023, DP024, DP025, DP033, DP036, DP044, DP060, DP061, DP062) under release 0.2.2.
  • Creates empty AnalyzerReleases.Unshipped.md (header only, no rules) for future rules.
  • Changes AdditionalFiles from a linked reference to ..\DesignPatterns.SourceGenerators\AnalyzerReleases.Unshipped.md to local files — correct, since Analyzers has its own set of rules separate from SourceGenerators.
  • NoWarn RS2003 is justified with a clear comment explaining why the release tracking analyzer can't verify shipped rule IDs (IncludeBuildOutput=false, descriptors linked via Compile Include not project reference).

Question

  • The Shipped.md lists rules under "Release 0.2.2". Were all these rules actually shipped in 0.2.2, or were some added earlier? If some were in earlier releases, they should be listed under their respective release versions. However, since this is the first Shipped.md file, grouping them under the current release is acceptable.

No blocking issues. Approve.

@Skymly Skymly merged commit cd67e89 into main Jul 4, 2026
3 checks passed
@Skymly Skymly deleted the fix/analyzer-releases-shipped branch July 4, 2026 03:43
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.

Create AnalyzerReleases.Shipped.md and move shipped DP001-DP062 from Unshipped

1 participant