mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
using Microsoft.CodeAnalysis.CodeFixes;
|
|
using Microsoft.CodeAnalysis.CSharp.Testing;
|
|
using Microsoft.CodeAnalysis.Diagnostics;
|
|
using Microsoft.CodeAnalysis.Testing.Verifiers;
|
|
|
|
namespace MakeConst.Test
|
|
{
|
|
public static partial class CSharpCodeFixVerifier<TAnalyzer, TCodeFix>
|
|
where TAnalyzer : DiagnosticAnalyzer, new()
|
|
where TCodeFix : CodeFixProvider, new()
|
|
{
|
|
public class Test : CSharpCodeFixTest<TAnalyzer, TCodeFix, MSTestVerifier>
|
|
{
|
|
public Test()
|
|
{
|
|
SolutionTransforms.Add((solution, projectId) =>
|
|
{
|
|
var compilationOptions = solution.GetProject(projectId).CompilationOptions;
|
|
compilationOptions = compilationOptions.WithSpecificDiagnosticOptions(
|
|
compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings));
|
|
solution = solution.WithProjectCompilationOptions(projectId, compilationOptions);
|
|
|
|
return solution;
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|