Skip to content

chore(analyzers): remove REACTOR_DOC_002 duplicate of CS1574 (#496) - #615

Merged
Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
mainfrom
azchohfi-remove-reactor-doc-002
Jun 22, 2026
Merged

Alexandre Zollinger Chohfi (azchohfi) merged 3 commits into
mainfrom
azchohfi-remove-reactor-doc-002

Conversation

@azchohfi

Copy link
Copy Markdown
Collaborator

Summary

REACTOR_DOC_002 (XmlDocCrefAnalyzer) was a pure re-skin of the built-in compiler diagnostic CS1574 ("XML comment has cref attribute that could not be resolved"). Its entire body did the same GetSymbolInfo → null-check → report that CS1574 does internally, adding no analysis on top. The analyzer's own XML doc admitted as much. Since CS1574 can already be elevated or suppressed per-project via .editorconfig, the "independent severity" rationale didn't justify carrying a duplicate Reactor-specific rule.

This removes REACTOR_DOC_002 and configures CS1574 directly on the framework project instead.

Changes

  • Delete src/Reactor.Analyzers.Internal/XmlDocCrefAnalyzer.cs and tests/.../XmlDocCrefAnalyzerTests.cs.
  • Remove the REACTOR_DOC_002 row from AnalyzerReleases.Unshipped.md (it never shipped externally).
  • Remove REACTOR_DOC_002 from the NoWarn lists in Reactor.csproj, Reactor.Advanced.csproj, and Reactor.Devtools.csproj.
  • Update AnalyzerPackagingTests.InternalAnalyzerAssembly_Hosts_DocCoverageRules so it no longer expects REACTOR_DOC_002 (still guards REACTOR_DOC_001).
  • Add src/Reactor/.editorconfig configuring CS1574 severity (warning, matching the prior behavior; raise to error to gate the build).
  • Update spec 041-docs-comprehensive-uplift.md §10.4, the analyzer-architecture / rules-of-reactor guides, and their .md.dt templates to drop REACTOR_DOC_002 references and point at CS1574.
  • Fix a stale REACTOR_DOC_002 reference in a ReferenceGenerator.cs comment.

Out of scope

REACTOR_DOC_001 stays — it earns its keep over CS1591 (requires a <summary> specifically and applies Reactor's doc-pipeline skip rules).

Verification

  • Reactor.Analyzers.Internal and dependent projects build with 0 errors/warnings.
  • dotnet test tests/Reactor.Tests --filter "FullyQualifiedName~AnalyzerTests" → 170 passed, 0 failed.

(The pre-existing ARM64 perf_bench XAML-compiler failures in a full Reactor.slnx build are environmental and unrelated to this change.)

Closes #496

REACTOR_DOC_002 (XmlDocCrefAnalyzer) was a pure re-skin of the built-in
CS1574 ("XML comment has cref attribute that could not be resolved"). Its
whole body did the same GetSymbolInfo + null check + report as CS1574,
adding no analysis on top. CS1574 can already be elevated/suppressed
per-project via .editorconfig, so the "independent severity" rationale
didn't justify a separate Reactor-specific rule.

- Delete XmlDocCrefAnalyzer and its tests
- Drop the REACTOR_DOC_002 row from AnalyzerReleases.Unshipped.md
- Remove REACTOR_DOC_002 from NoWarn in Reactor/Advanced/Devtools csproj
- Update AnalyzerPackagingTests to no longer expect REACTOR_DOC_002
- Add src/Reactor/.editorconfig configuring CS1574 severity (warning)
- Update spec 041 §10.4 and the analyzer-architecture / rules-of-reactor
  guides (and templates) to point at CS1574

REACTOR_DOC_001 stays — it provides real value beyond CS1591.

Closes #496

Co-authored-by: Copilot <[email protected]>
Follow-up doc hygiene from the PR review of #615:

- Update the living "Conventions" bullet in the spec-041 task file to
  state that public-API XML-doc enforcement uses REACTOR_DOC_001 plus
  the built-in CS1574 (REACTOR_DOC_002 was deleted). The checked-off
  §1.8 completed-task log is historical and left untouched.
- Drop the stale "REACTOR_DOC_001 / 002" reference from the
  analyzer-architecture template front-matter goal.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the internal-only REACTOR_DOC_002 analyzer (XmlDocCrefAnalyzer) as a duplicate of the compiler’s CS1574, and switches the framework to configuring CS1574 directly (scoped to src/Reactor/). Documentation and packaging tests are updated to reflect that only REACTOR_DOC_001 remains as a Reactor-specific doc rule.

Changes:

  • Deleted XmlDocCrefAnalyzer (REACTOR_DOC_002) and its unit tests; updated analyzer packaging tests accordingly.
  • Removed REACTOR_DOC_002 from NoWarn lists and unshipped analyzer release notes.
  • Added src/Reactor/.editorconfig to configure CS1574 severity; updated specs/guides/templates and a stale comment in the reference generator.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Reactor.Tests/AnalyzerTests/XmlDocCrefAnalyzerTests.cs Removes tests for the deleted REACTOR_DOC_002 analyzer.
tests/Reactor.Tests/AnalyzerTests/AnalyzerPackagingTests.cs Updates packaging guard to only assert REACTOR_DOC_001 exists internally.
src/Reactor/Reactor.csproj Drops REACTOR_DOC_002 from NoWarn and updates doc-comment rationale to use CS1574.
src/Reactor/.editorconfig New scoped config setting CS1574 severity for the framework source.
src/Reactor.Devtools/Reactor.Devtools.csproj Removes REACTOR_DOC_002 from NoWarn.
src/Reactor.Cli/Docs/ReferenceGen/ReferenceGenerator.cs Updates comment to reference CS1574 instead of REACTOR_DOC_002.
src/Reactor.Analyzers.Internal/XmlDocCrefAnalyzer.cs Deletes the duplicate analyzer implementation.
src/Reactor.Analyzers.Internal/AnalyzerReleases.Unshipped.md Removes the unshipped entry for REACTOR_DOC_002.
src/Reactor.Advanced/Reactor.Advanced.csproj Removes REACTOR_DOC_002 from NoWarn.
docs/specs/tasks/041-docs-comprehensive-uplift-implementation.md Starts migrating task/spec narrative from REACTOR_DOC_002 to CS1574.
docs/specs/041-docs-comprehensive-uplift.md Updates spec text to point at CS1574 (with scoped severity config).
docs/guide/rules-of-reactor.md Replaces REACTOR_DOC_002 with CS1574 in the rule table.
docs/guide/analyzer-architecture.md Removes REACTOR_DOC_002 from the analyzer list and updates narrative.
docs/_pipeline/templates/rules-of-reactor.md.dt Keeps generated guide source aligned: uses CS1574 instead of REACTOR_DOC_002.
docs/_pipeline/templates/analyzer-architecture.md.dt Keeps generated guide source aligned: removes REACTOR_DOC_002 and updates narrative.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Reactor/Reactor.csproj Resolved
Address PR #615 review comments:

- Fix the living Reactor.csproj ProjectReference comment that still said
  the internal analyzer carries the "REACTOR_DOC_001 / _002 rules" — it
  now carries only REACTOR_DOC_001.
- Add a forward-pointing note under the spec-041 §1.8 task heading
  recording that REACTOR_DOC_002 was later removed in favor of the
  built-in CS1574. The checked-off [x] completed-task entries are left
  intact as the original Phase 1.8 implementation record.

Co-authored-by: Copilot <[email protected]>
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) merged commit fc3201a into main Jun 22, 2026
18 checks passed
@azchohfi
Alexandre Zollinger Chohfi (azchohfi) deleted the azchohfi-remove-reactor-doc-002 branch June 22, 2026 17:51
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.

Remove REACTOR_DOC_002 — it duplicates CS1574 without adding analysis

2 participants