Skip to content

docs: Roslyn Analyzer documentation and samples#486

Merged
csharpfritz merged 1 commit intodevfrom
feature/analyzer-documentation
Mar 20, 2026
Merged

docs: Roslyn Analyzer documentation and samples#486
csharpfritz merged 1 commit intodevfrom
feature/analyzer-documentation

Conversation

@csharpfritz
Copy link
Copy Markdown
Collaborator

Roslyn Analyzer Documentation & Samples

Adds comprehensive MkDocs documentation and sample app content for all 8 BWFC Roslyn Analyzers.

What's in this PR

  • docs/Migration/Analyzers.md - Full reference with installation, summary table, per-rule before/after code, .editorconfig config
  • samples/AfterBlazorServerSide - Analyzer reference page in sample app
  • samples/AnalyzerExamples/ - Standalone before/after .cs.example files
  • mkdocs.yml - Nav entry under Migration section
  • MkDocs strict build and sample app build verified clean

The 8 Analyzers

Rule Severity Detects Fix
BWFC001 Warning Missing [Parameter] on WebControl properties Adds attribute
BWFC002 Warning ViewState access Private field + property
BWFC003 Warning IsPostBack checks OnInitializedAsync lifecycle
BWFC004 Warning Response.Redirect() NavigationManager.NavigateTo()
BWFC005 Warning Session access ProtectedSessionStorage
BWFC010 Info Missing required component properties Nudge to add
BWFC011 Info Web Forms event signatures EventCallback pattern
BWFC012 Warning runat=server leftovers Removes artifacts

Migration Workflow

These are Layer 3 of the BWFC migration pipeline: L1 script (markup), L2 Copilot transforms (code-behind), L3 analyzers (continuous IDE + CI). L1/L2 run once; analyzers run continuously on every build.

Add 8 Roslyn analyzers with code fixes for Web Forms migration patterns:
- BWFC001: Missing [Parameter] attribute
- BWFC002: ViewState usage
- BWFC003: IsPostBack usage
- BWFC004: Response.Redirect
- BWFC005: Session usage
- BWFC010: Required component attributes
- BWFC011: Web Forms event handler signatures
- BWFC012: runat=server leftovers

Includes 89 tests, MkDocs documentation, and sample app content.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@csharpfritz csharpfritz force-pushed the feature/analyzer-documentation branch from 0a2b913 to d2cdf7f Compare March 20, 2026 13:42
@csharpfritz csharpfritz changed the base branch from experiment/aspx-middleware to dev March 20, 2026 13:42
@csharpfritz csharpfritz merged commit 46cb20d into dev Mar 20, 2026
@csharpfritz csharpfritz deleted the feature/analyzer-documentation branch March 20, 2026 13:44
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