You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add Roslyn analyzer documentation, samples, and examples
- Create docs/Migration/Analyzers.md with full reference for all 8 BWFC analyzers (BWFC001-005, BWFC010-012) including before/after code, code fix descriptions, installation guide, and .editorconfig configuration
- Add analyzer sample page to AfterBlazorServerSide under MigrationTools/Analyzers with inline code examples
- Create standalone BeforeFix/AfterFix example files showing full analyzer pass on realistic migrated code
- Update mkdocs.yml nav and Migration readme with analyzer cross-references
- Add Migration Tools nav category to sample app ComponentList
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Cross-references to existing BWFC docs (ViewState utility, Response.Redirect utility) where relevant
540
+
541
+
**Learnings:**
542
+
- Analyzer code fixes fall into two categories: (1) additive (BWFC001 adds [Parameter]), (2) commenting-out with TODO (BWFC002-005, BWFC011). The commenting pattern is intentional — these require human judgment for the replacement.
543
+
- BWFC010 (RequiredAttributeAnalyzer) tracks a small set of components (GridView, HyperLink, Image) — extensible in future
544
+
- BWFC012 (RunatServerAnalyzer) targets string literals, not markup — catches dynamically-built HTML, not .razor files
545
+
- Source reading revealed team decision (2026-03-21): BWFC001 skips static properties — documented this in the analyzer description
546
+
- MkDocs strict build passes with analyzer docs included (59.43s build time)
Copy file name to clipboardExpand all lines: .squad/agents/jubilee/history.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -205,3 +205,13 @@
205
205
-**Build verified:** 0 errors.
206
206
207
207
208
+
209
+
### Analyzer Sample Content (2026-03-20)
210
+
211
+
-**Created Razor sample page** at `samples/AfterBlazorServerSide/Components/Pages/MigrationTools/Analyzers/Index.razor` informational/reference page covering all 8 BWFC analyzers (BWFC001-005, BWFC010-012) with installation instructions, summary table, and before/after code examples for each rule.
212
+
-**Created before/after example files** at `samples/AnalyzerExamples/BeforeFix.cs.example` and `AfterFix.cs.example` realistic ProductManager code-behind showing every analyzer pattern in context.
213
+
-**Added 'Migration Tools' nav category** to `ComponentList.razor` with link to Roslyn Analyzers page.
214
+
-**Route pattern:**`/MigrationTools/Analyzers` new top-level route alongside `/ControlSamples/` and `/UtilityFeatures/` since analyzers are not controls or utility features.
215
+
-**Convention for non-compilable examples:** Used `.cs.example` extension per task requirements to signal these are reference files, not build artifacts.
216
+
-**Lesson:** Analyzer sample pages are educational/reference-style (like Theming) rather than interactive demo pages. No `@code` block needed since there's no interactive state.
# Decision: Roslyn Analyzer Documentation Placement and Structure
2
+
3
+
**Author:** Beast (Technical Writer)
4
+
**Date:** 2026-03-XX
5
+
**Status:** Delivered
6
+
7
+
## Context
8
+
9
+
The BWFC project has 8 Roslyn analyzers with code fixes in `BlazorWebFormsComponents.Analyzers`. These needed comprehensive documentation for developers using the analyzer package post-migration.
10
+
11
+
## Decision
12
+
13
+
1.**Placement:**`docs/Migration/Analyzers.md` under the Migration section, positioned after "Automated Migration Guide" and before "Deprecation Guidance". Rationale: analyzers are a post-migration tool — developers run automation first, then use analyzers to clean up code-behind patterns the script couldn't address.
14
+
15
+
2.**Structure:** Each analyzer gets a dedicated section with: what it detects, why it matters, before/after code, and code fix description. This matches the pattern established in DeprecationGuidance.md.
16
+
17
+
3.**Cross-references:** Links to existing utility docs (ViewState, Response.Redirect) where the analyzer topic overlaps with a BWFC compatibility shim.
18
+
19
+
4.**Migration readme update:** Added "Clean Up with Roslyn Analyzers" section to `docs/Migration/readme.md` as a follow-up step in the migration journey.
20
+
21
+
## Impact
22
+
23
+
- New file: `docs/Migration/Analyzers.md` (~17.7 KB)
24
+
- Updated: `mkdocs.yml` (nav entry), `docs/Migration/readme.md` (new section)
# Decision: Analyzer Samples Use /MigrationTools/ Route
2
+
3
+
**Author:** Jubilee
4
+
**Date:** 2026-03-20
5
+
**Status:** Implemented
6
+
7
+
## Context
8
+
Needed a sample page for the BWFC Roslyn analyzer suite. Analyzers are IDE tools, not UI components, so they don't fit under `/ControlSamples/` or `/UtilityFeatures/`.
9
+
10
+
## Decision
11
+
Created a new `/MigrationTools/` route category with its own nav section in ComponentList.razor. The page at `/MigrationTools/Analyzers` is an informational/reference page (no interactive demos) following the educational style of the Theming page.
12
+
13
+
Standalone before/after example files use `.cs.example` extension in `samples/AnalyzerExamples/` to distinguish reference examples from compilable code.
14
+
15
+
## Impact
16
+
- New nav category 'Migration Tools' in ComponentList.razor
0 commit comments