feat: BWFC013/014 analyzers, architecture guide, CI docs#487
Merged
csharpfritz merged 6 commits intodevfrom Mar 21, 2026
Merged
feat: BWFC013/014 analyzers, architecture guide, CI docs#487csharpfritz merged 6 commits intodevfrom
csharpfritz merged 6 commits intodevfrom
Conversation
csharpfritz
added a commit
that referenced
this pull request
Mar 20, 2026
…gs merged Session: 2026-03-20T14-18-05Z-analyzer-sprint1 Requested by: Scribe Changes: - Orchestration logs for Cyclops (BWFC013/014 analyzers, 6 files, 111 tests) and Beast (architecture guide, 579 lines) - Session log for analyzer sprint 1 execution - Merged 10 decision inbox files decisions.md (BWFC013/014 IDs, analyzer docs, deprecation guidance, ASHX/AXD middleware, RouteData fix, component audit, navigation UX, sample pages, middleware testing) - Deleted all inbox files after merge - Appended team updates to Cyclops, Beast, Forge, Jubilee, Rogue history.md files - PR #487 opened on upstream targeting dev branch
csharpfritz
added a commit
that referenced
this pull request
Mar 20, 2026
…rm CI Code fix providers for BWFC002, BWFC004, BWFC010, BWFC012 hardcoded \r\n in EndOfLine trivia, causing test failures on Linux CI runners where source files have \n line endings. Added SyntaxExtensions.DetectEndOfLine() helper that reads the first EndOfLineTrivia from the syntax tree, ensuring code fixes match the document's existing line ending style. Fixes failing tests in PR #487. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Analyzer Expansion: - BWFC013: Detects Response.Write/WriteFile/Clear/Flush/End usage - BWFC014: Detects Request.Form/Cookies/Headers/Files/QueryString access - Both produce WARNING diagnostics with guidance-only code fixes (TODO comments) - 21 new tests (111 total, all passing) Documentation: - dev-docs/ANALYZER-ARCHITECTURE.md: Contributor guide for building analyzers - docs/Migration/Analyzers.md: BWFC013/014 entries, CI/CD integration section, .editorconfig severity tuning, prioritization guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gs merged Session: 2026-03-20T14-18-05Z-analyzer-sprint1 Requested by: Scribe Changes: - Orchestration logs for Cyclops (BWFC013/014 analyzers, 6 files, 111 tests) and Beast (architecture guide, 579 lines) - Session log for analyzer sprint 1 execution - Merged 10 decision inbox files decisions.md (BWFC013/014 IDs, analyzer docs, deprecation guidance, ASHX/AXD middleware, RouteData fix, component audit, navigation UX, sample pages, middleware testing) - Deleted all inbox files after merge - Appended team updates to Cyclops, Beast, Forge, Jubilee, Rogue history.md files - PR #487 opened on upstream targeting dev branch
Task 1: Added ProjectReference from BlazorWebFormsComponents to BlazorWebFormsComponents.Analyzers with OutputItemType=Analyzer so consumers get Roslyn analyzers automatically via the main NuGet package. Task 2: Added -Prescan switch to bwfc-migrate.ps1 that scans source .cs files for 9 BWFC analyzer patterns (BWFC001-005, 011-014) and outputs a JSON summary report without performing any migration. Includes human-readable breakdown via Write-Host. Build: 0 errors, 111 analyzer tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- build.yml: restore, build, run, upload, and publish analyzer test results - squad-ci.yml: replace placeholder with dotnet restore/build/test for both suites - Add setup-dotnet step to squad-ci.yml for .NET 10.0.x Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All 4 code fix providers (BWFC001, BWFC004, BWFC013, BWFC014) used hardcoded \r\n in SyntaxFactory.EndOfLine(), causing test failures on Linux CI where source strings use \n. - Add SyntaxExtensions.DetectEndOfLine() helper that reads line endings from the existing syntax tree - Replace hardcoded \r\n with root.DetectEndOfLine() in all 4 code fix providers - Replace foreach+if with LINQ .Where() (CodeQL suggestion) All 111 analyzer tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fa30f3b to
6223eab
Compare
The using directive insertion used SyntaxFactory.CarriageReturnLineFeed which hardcodes CRLF, failing on Linux CI where source uses LF. Replace with newRoot.DetectEndOfLine() for cross-platform compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Analyzer Sprint 1 Expansion & Documentation
New Analyzers
BWFC013: Response Object Usage (WARNING)
Detects
Response.Write(),Response.WriteFile(),Response.Clear(),Response.Flush(),Response.End()methods with no direct Blazor equivalent. Code fix inserts a TODO comment with migration guidance.BWFC014: Request Object Usage (WARNING)
Detects
Request.Form[],Request.Cookies[],Request.Headers[],Request.Files,Request.QueryString[],Request.ServerVariables[]patterns that need Blazor-specific replacements. Code fix inserts a TODO comment with migration guidance.Documentation
Test Results
Files Changed (13 files, +2,046 lines)
Total analyzer count: 10 rules (BWFC001-005, 010-014)