Skip to content

Conversation

@stsrki
Copy link
Collaborator

@stsrki stsrki commented Dec 11, 2025

Blazorise.Analyzers

  • Add new Roslyn analyzer package Blazorise.Analyzers (netstandard2.0) to help migrate existing codebases to Blazorise
    2.0 by surfacing breaking changes directly on .razor/C# source locations.
  • Implement RenderTreeMigrationEngine to walk Razor-generated RenderTreeBuilder code (including Blazor
    TypeInference.Create* call sites and RuntimeHelpers.TypeCheck wrappers) and provide a common hook for multiple
    migration rules.
  • Add centralized migration data in Source/Helpers/Blazorise.Analyzers/BlazoriseMigrationMappings.cs covering
    component renames, parameter renames, TValue shape expectations (single vs multi selection), plus type/member
    renames/removals (with notes).
  • Add analyzer packaging glue via Source/Helpers/Blazorise.Analyzers/build/Blazorise.Analyzers.props to auto-load the
    analyzer and include host files (index.html, _Host.cshtml, App.razor) as AdditionalFiles for non-C# analysis.
  • Add Tests/Blazorise.Analyzers.Tests xUnit suite validating rule behavior across common migration scenarios
    (component/tag/parameter renames, TValue shape validation, type inference cases, host-file scanning, member/type
    changes).
  • Dogfood the analyzer by referencing it as an analyzer in Demos/Blazorise.Demo/Blazorise.Demo.csproj and
    Documentation/Blazorise.Docs/Blazorise.Docs.csproj; update Demos/Blazorise.Demo/Pages/Tests/CardsPage.razor to use
    CardLink.To (was Source).
  • Update repo plumbing: add Microsoft.CodeAnalysis version to Directory.Packages.props, include new projects in
    Blazorise.slnx, pack the analyzer in NuGet/dotnet-pack.bat, and ignore obj-nuget/ in .gitignore.

Diagnostics Added

  • BLZC001 Blazorise component renamed
  • BLZR001 Blazorise Razor tag renamed
  • BLZP001 Blazorise parameter renamed
  • BLZP002 Blazorise parameter type changed (e.g., DataGridColumn.Width, Row/Fields.Gutter)
  • BLZT001 Blazorise TValue shape invalid (single vs list/array for multi-selection)
  • BLZS001 Blazorise member renamed
  • BLZS002 Blazorise member removed
  • BLZTYP001 Blazorise type renamed
  • BLZTYP002 Blazorise type removed
  • BLZJS001 Blazorise Charts static Chart.js script reference (host-file cleanup)

Release Tracking

  • Populate AnalyzerReleases.Shipped.txt / AnalyzerReleases.Unshipped.txt to track shipped vs in-progress rule IDs for
    the analyzer package.

Blazorise.Analyzers.Tests

  • New test project in Tests/Blazorise.Analyzers.Tests runs the analyzer against in-memory compilations.
  • Tests cover the three diagnostics: component rename, parameter rename, and TValue shape errors for single vs multi-
    selection.

@stsrki stsrki changed the title Migration Analyzer for 2.0 Migration Analyzers for 2.0 Dec 11, 2025
@stsrki stsrki changed the title Migration Analyzers for 2.0 Add Blazorise.Analyzers migration analyzers for Blazorise 2.0 Dec 15, 2025
@stsrki stsrki merged commit 527fca9 into next-2.0 Dec 15, 2025
1 check passed
@stsrki stsrki deleted the next-2.0-analyzer branch December 15, 2025 14:25
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.

2 participants