Closed JayaPrasad918 closed 6 years ago
You are missing some parameters for the plugin.
Please ensure you have set "sonar.cs.fxcop.assembly" or "sonar.cs.fxcop.slnFile", "sonar.cs.fxcop.fxCopCmdPath" and "sonar.cs.fxcop.directory" by use of the /d:"key:value" parameter or SonarQube.Analysis.xml and cs.project.
Please see readme.md for more informations about the required and possible parameters and https://docs.sonarqube.org/display/SCAN/Additional+Analysis+Parameters for how to set parameters.
Thank you Daniel, Is there any other way to have the analysis performed without adding the parameters "sonar.cs.fxcop.slnFile", "sonar.cs.fxcop.fxCopCmdPath" and "sonar.cs.fxcop.director because we have multiple build definitions which are using Sonar tasks updating each definition would be difficult.
Sorry in the moment there is no other way, I think it should be possible to change FxCopSensor.execute so it searches for the *.sln file in context.fileSystem() but that is a new feature for the next version.
Thanks Daniel, (As per my suggestion) If we add this key parameters ("sonar.cs.fxcop.slnFile", "sonar.cs.fxcop.fxCopCmdPath" and "sonar.cs.fxcop.director") in to the SonarQube.Analysis.xml file properties (like
Hi Daniel, How can i find the reason for the FxCop analysis is moved to Post process step from MSBuild step. Thanks in Advance
You can use the SonarQube.Analysis.xml file for the parameters instead of command line arguments. See https://docs.sonarqube.org/display/SCAN/Additional+Analysis+Parameters In the readme.md I only listed the command line parameters but both ways will work. (I have to extend the readme later on) I not really know why the analysis was moved, that was made and decided by the devlopers maintaining the SonarQube MSBuild Tools. But my speculation is that this was made because the fx cop plugin was originally part of the C# Plugin and as it was split into its own plugin it was moved to the postbuild step.
I will make a new Featrue request for remaining Task.
Complete Sonarqube analysis task is failing with the below error
ERROR: Error during SonarQube Scanner execution java.lang.IllegalArgumentException: No FxCop analysis has been performed on this project, whereas it contains cs files: Verify that you are using the latest version of the SonarQube Scanner for MSBuild, and if you do, please report a bug. In the short term, you can disable all FxCop rules from your quality profile to get rid of this error. If I am using Sonar build task 4.0 analysis is failing but if i am using 2.0 sonar build task version it is working. Could you please help on this issue