-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to generate XML file for analyzers on build #430
Comments
I like this idea very much! |
Yes we would like to produce a file. The CodeAnalysisLog.xml is generated by FxCop. I think we should add a switch to the compiler to output results in an xml file and maybe we can wire up VS to produce that file when the "Enable CodeAnalysis on Build" item is checked. |
That would be awesome! |
This has been implemented as an /errorlog switch. |
Thanks for the amazing work. 😃 |
Yes, it is in VS2015. You have to set the myLogFile.json switch in your project file and that will cause myLogFile.json to be created on a build. |
Thanks for your answer, but I don't understand: we were talking about an xml file, is that still possible? |
No we chose to output the results in the SARIF Format and not XML. The project file I was referring to is the csproj file. If you have Roslyn analyzers installed to a project, they get run on build automatically - so the "Enable CodeAnalysis on Build" option doesn't mean much. If one wants to disable codeanalysis on build, they would simply remove the analyzers from the project. |
Ok, thanks for the clarification. <ItemGroup>
<Analyzer Include="..\packages\codecracker.CSharp.1.0.0-rc5\analyzers\dotnet\cs\CodeCracker.Common.dll" />
<Analyzer Include="..\packages\codecracker.CSharp.1.0.0-rc5\analyzers\dotnet\cs\CodeCracker.CSharp.dll" />
</ItemGroup> Is it there that I need to add a switch? |
I haven't realize that it was a simple |
When "Enable Code Analysis on Build" is checked in the "Code Analysis" tab of the project properties, at each build an xml file with the name ".CodeAnalysisLog.xml is generated.
It seems that it contains only the analysis result for FxCop but not for individual parser like Code Cracker.
Is it possible to have an xml file by analyzer?
The content could be the informations showed in Visual Studio:
The text was updated successfully, but these errors were encountered: