Replies: 1 comment 4 replies
-
|
Greetings to Sweden, First of all I'm sorry for a bit late answer.
Your description seems to be correct. It is correct that supported diagnostics for If Regarding CA1401: I've installed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm looking into this tool for the first time and generally it looks very cool! I was looking for a CLI tool to apply static analysis warnings and it looks like the Roslynator.CommandLine tool is exactly what I'm looking for.
However, I'm giving it a few test runs with the commands
analyzevsfixwith verbositydiagand there are a few details that I don't understand. I'm testing it with a minimal single-project solution, targeting .NET 5.0, and I'm running on Windows. I did tried this with a few analyzers from NuGet packages, but the following describes the results from using only the integratedMicrosoft.CodeAnalysis.CSharp.NetAnalyzers(v 5.0.3.2303) andMicrosoft.CodeAnalysis.NetAnalyzers(v 5.0.3.2303) assemblies.What is confusing me, is essentially the output
x supported diagnostics with prefix yandxx fixable diagnostics with prefix yy, which is shows in the console just before Roslynator compiles the project. The thing is that the number ofsupported diagnosticsvaries betweenanalyzeandfix.Example:
This example only cherry-picks a few diagnostic IDs to make the point.
It seems like supported diagnostics in
fixis always a subset of supported diagnostics inanalyze. The set of fixable diagnostics sometimes adds diagnostic IDs, which are not mentioned in neither sets beforehand (CA1001 in this example), but also occasionally removes a diagnostic ID, which was previously supported (CA1401 in this example). I at first thought these three sets could be classified asHowever, this would not explain that CA1401 is missing for "fixable".
Is there anything that I'm clearly misinterpreting here? Thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions