Skip to content

Analyzers: ship code-fix providers for the mechanical rules (FCE009 scaffolding first) #236

Description

@Reefact

Problem

All 18 shipped diagnostics are report-only — the repository contains no CodeFixProvider at all. The library's only real adoption tax is the ~25-line documentation-method boilerplate per error (the WritingErrorsGuide "Complete example"), which is exactly scaffolding-shaped; the analyzer suites this project will be compared against (Roslyn, xUnit, Meziantou) all ship fixes.

Impact

The IDE names the problem but the developer hand-writes the boilerplate the vision depends on — the missing half of the IDE experience, at the moment of maximal receptivity.

Direction

  • Add a code-fix companion assembly packaged alongside the analyzers under analyzers/dotnet/cs (Workspaces is host-provided in IDEs; respect the ADR-0001 Roslyn 4.8.0 floor and extend the floor-check grep + packaging target to the second assembly).
  • Flagship: FCE009 → generate [DocumentedBy(nameof(XDocumentation))] plus a DescribeError skeleton (title/description/rule/diagnostic/examples placeholders) — the fix actively teaches the documentation convention.
  • Mechanical fixes alongside: FCE006 (create the missing documentation method), FCE008 (add [ProvidesErrorsFor]), FCE004 (UPPER_SNAKE_CASE rewrite), FCE016 (insert throw).

Acceptance criteria

  • The FCE009 fix produces a compilable factory+documentation pair matching the WritingErrorsGuide idiom.
  • The fixes ship in the main package, load on the floor SDK (floor-check proves it), and each has tests.

Context

Surfaced by the 2026-07-20 architecture, design & ecosystem audit (doc/handwritten/for-maintainers/audit/2026-07-20-firstclasserrors-architecture-and-design-audit.md, §13.3(c)/§14-HV4; branch claude/firstclasserrors-audit-83gap7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions