Skip to content

feat: build the analyzer against four Roslyn API versions - #30

Merged
samtrion merged 1 commit into
mainfrom
feat/multi-roslyn-version-support
Aug 4, 2026
Merged

feat: build the analyzer against four Roslyn API versions#30
samtrion merged 1 commit into
mainfrom
feat/multi-roslyn-version-support

Conversation

@samtrion

@samtrion samtrion commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Splits NetEvolve.Analyzer into per-Roslyn-version build projects (4.4.0, 4.7.0, 4.14.0, 5.6.0 — latest), each packed into its own analyzers/dotnet/roslynX.Y/cs folder so .NET SDKs 8.0.400+ automatically load the highest version they support. NetEvolve.Analyzer.csproj itself becomes a pure packing project with no source of its own.
  • Test projects (NetEvolve.Analyzer.Tests.Unit/.Integration) now build against multiple target frameworks (net6.0-net10.0, plus net472/net48/net481 on Windows) and reference a different Roslyn variant per framework, so the same test suite actually exercises several Roslyn APIs in one run instead of only one.
  • Mutation testing is split into per-variant stryker-config.roslyn*.json files, since Stryker.NET has no way to target multiple source projects from a single configuration; the mutation workflow now runs them as a matrix.
  • Adds classic .NET Framework compatibility for the test harness: a Polyfill package reference (with TUnit's own conflicting auto-injection disabled), and a shared FrameworkReferences helper per test project providing a portable fallback for resolving framework reference assemblies when TRUSTED_PLATFORM_ASSEMBLIES isn't populated (net472/net48/net481).
  • Fixes a couple of latent CA2016/CA1307 issues that the new Roslyn variants and target frameworks surfaced.

Test plan

  • dotnet build Analyzer.slnx -c Release — all 5 src projects (pack + 4 Roslyn variants) and both test projects build across all 8 target frameworks with 0 warnings/errors
  • dotnet test Analyzer.slnx -c Release — 1504/1504 tests pass across all target frameworks
  • csharpier check . — clean
  • Verified the packed nupkg contains the expected analyzers/dotnet/roslyn{4.4,4.7,4.14,5.6}/cs/NetEvolve.Analyzer.dll layout and that a consumer project on each locally installed SDK (6.0.428, 8.0.423, 9.0.316, 10.0.302) loads exactly one matching variant, no duplicates

Splits NetEvolve.Analyzer into per-Roslyn-version build projects
(4.4.0, 4.7.0, 4.14.0, 5.6.0) packed into their own analyzers/dotnet/
roslynX.Y/cs folder, so .NET SDKs 8.0.400+ load the highest version
they support automatically. The main NetEvolve.Analyzer.csproj becomes
a pure packing project with no source of its own.

Test projects now build against multiple target frameworks
(net6.0-net10.0 plus net472/net48/net481 on Windows) and reference a
different Roslyn variant per framework, exercising the analyzer
against several Roslyn APIs in one test run instead of just one.
Mutation testing is split into per-variant stryker-config files since
Stryker.NET can't target multiple source projects from one config.

Also fixes classic .NET Framework compatibility for the test harness
(Polyfill package reference, TUnit's own auto-injection disabled to
avoid a duplicate PackageReference, a portable framework-reference
resolution fallback shared via a new FrameworkReferences helper per
test project) and a couple of latent CA2016/CA1307 issues the new
Roslyn variants surfaced.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • state:ready for merge

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dac6b6eb-6573-4d66-a6f7-539a25e608d4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.88%. Comparing base (07c7093) to head (054dd7b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #30   +/-   ##
=======================================
  Coverage   95.88%   95.88%           
=======================================
  Files          19       19           
  Lines         777      777           
  Branches      141      141           
=======================================
  Hits          745      745           
  Misses         12       12           
  Partials       20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtrion
samtrion merged commit aadcaaa into main Aug 4, 2026
12 of 13 checks passed
@samtrion
samtrion deleted the feat/multi-roslyn-version-support branch August 4, 2026 10:56
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