Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Dec 30, 2025

Copilot AI review requested due to automatic review settings December 30, 2025 13:43
@roji
Copy link
Member Author

roji commented Dec 30, 2025

/cc @Youssef1313, thanks for the tip in #37106 (comment).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the analyzer tests from obsolete XUnit-specific testing packages to the newer non-obsolete packages recommended by the Roslyn SDK team. The changes update package references, refactor test infrastructure to use the new API patterns, and re-enable previously disabled analyzer tests.

Key changes:

  • Upgrades Microsoft.CodeAnalysis testing packages to version 1.1.3-beta1.25564.1 and switches from XUnit-specific to non-XUnit packages
  • Refactors test utility classes to use constructors instead of overriding CreateProjectImplAsync, and changes from XUnitVerifier to DefaultVerifier
  • Adds RootFinder utility class to locate the repository root for NuGet.config resolution

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eng/Versions.props Updates test dependency versions to 1.1.3-beta1.25564.1 with reference to issue #1175
test/Directory.Packages.props Switches from Microsoft.CodeAnalysis.*.Testing.XUnit packages to non-XUnit variants
test/EFCore.Analyzers.Tests/EFCore.Analyzers.Tests.csproj Updates package references to remove .XUnit suffix
test/EFCore.Analyzers.Tests/TestUtilities/CSharpAnalyzerVerifier.cs Refactors to use DefaultVerifier and constructor-based setup with DisabledDiagnostics
test/EFCore.Analyzers.Tests/TestUtilities/CSharpCodeFixVerifier.cs Refactors to use DefaultVerifier and constructor-based setup with DisabledDiagnostics
test/EFCore.Analyzers.Tests/TestUtilities/RootFinder.cs Adds utility class to locate Git repository root for NuGet.config path resolution
test/EFCore.Analyzers.Tests/UninitializedDbSetDiagnosticSuppressorTests.cs Changes test class visibility from internal to public and removes issue comment
test/EFCore.Analyzers.Tests/StringInterpolationInRawQueriesAnalyzerTests.cs Changes test class visibility from internal to public and removes issue comment
test/EFCore.Analyzers.Tests/StringConcatenationInRawQueriesAnalyzerTests.cs Changes test class visibility from internal to public and removes issue comment
test/EFCore.Analyzers.Tests/InternalUsageDiagnosticAnalyzerTests.cs Changes test class visibility from internal to public and removes issue comment

@roji roji enabled auto-merge (squash) December 30, 2025 22:30
@roji roji merged commit 62f0fae into dotnet:main Dec 30, 2025
7 checks passed
@roji roji deleted the AnalyzerTests branch December 30, 2025 23:20
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.

Analyzer tests are accessing nuget.org Move off of Microsoft.CodeAnalysis.CSharp.{Analyzer,CodeFix}.Testing.XUnit

2 participants