"Analyzer with Code Fix" project template with ConventionCodeFixVerifier test project
Install the template:
dotnet new -i AnalyzerProject.ConventionNuGet: https://www.nuget.org/packages/AnalyzerProject.Convention/
Create a new project:
dotnet new AnalyzerConventionThis project template contains:
- C# "Analyzer with Code Fix (.NET Standard)" project
- with ConventionCodeFixVerifier
- with XUnit
Extends the CodeFixVerifier class in the "Analyzer with Code Fix" project template to read test cases from .csx files by naming convention.
- Put the following files in
/DataSource/[test class name]/[test method name]folder*.csinSourcefolder: inputs for your Analyzer/Code Fix*.jsoninDiagnosticfolder: diagnostic results of the Source.cs by your Analyzer*.csinExpected{n}folder: output source codes by the n-th action of your Code Fix
