Had to disable these rules on our project to get analysis to finish.
Versions:
- SonarScanner for MSBuild 4.5
- SonarQube Scanner 3.2.0.1227
- Java 1.8.0_201
- SonarQube server 7.6.0
Steps to reproduce
- It’s reproducible on our project, which is private but we might be able to get what you guys need to debug it.
- I re-enabled s2631 and have the
.sonarqube/out/ucfg_cs2
but I’d prefer not to share it publicly. - I can do that for the remaining issues as well if that would help.
- Error is basically the same as this one: S2631 crashes analyzer
Workaround
- disable the rules.
Error
- Started with initialization then jumps to failure
[10:03:19]
**[Step 6/8]* Starting: C:\BuildAgent\temp\agentTmp\custom_script109244475471025413.cmd*
[10:03:19]
**[Step 6/8]* in directory: C:\BuildAgent\work\d09f7763a6e9e4f8*
[10:03:19]
**[Step 6/8]* SonarScanner for MSBuild 4.5*
[10:03:19]
**[Step 6/8]* Using the .NET Framework version of the Scanner for MSBuild*
[10:03:19]
**[Step 6/8]* Default properties file was found at C:\sonar-scanner-msbuild\SonarQube.Analysis.xml*
[10:03:19]
**[Step 6/8]* Loading analysis properties from C:\sonar-scanner-msbuild\SonarQube.Analysis.xml*
[10:03:19]
**[Step 6/8]* Post-processing started.*
[10:03:20]
**[Step 6/8]* SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m*
[10:03:20]
**[Step 6/8]* Calling the SonarQube Scanner...*
[10:03:20]
**[Step 6/8]* INFO: Scanner configuration file: C:\sonar-scanner-msbuild\sonar-scanner-3.2.0.1227\bin\..\conf\sonar-scanner.properties*
[10:03:20]
**[Step 6/8]* INFO: Project root configuration file: C:\BuildAgent\work\d09f7763a6e9e4f8\.sonarqube\out\sonar-project.properties*
[10:03:20]
**[Step 6/8]* INFO: SonarQube Scanner 3.2.0.1227*
[10:03:20]
**[Step 6/8]* INFO: Java 1.8.0_201 Oracle Corporation (64-bit)*
[10:03:20]
**[Step 6/8]* INFO: Windows 10 10.0 amd64*
[10:03:20]
**[Step 6/8]* INFO: SONAR_SCANNER_OPTS=-Xmx1024m*
[10:03:21]
**[Step 6/8]* INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache*
[10:03:21]
**[Step 6/8]* INFO: SonarQube server 7.6.0*
[10:04:07]
**[Step 6/8]* INFO: Importing 57 Roslyn reports*
[10:04:08]
**[Step 6/8]* INFO: Sensor C# [csharp] (done) | time=4517ms*
[10:04:08]
**[Step 6/8]* INFO: Sensor Zero Coverage Sensor*
[10:04:09]
**[Step 6/8]* INFO: Sensor Zero Coverage Sensor (done) | time=492ms*
[10:04:09]
**[Step 6/8]* INFO: Sensor JavaSecuritySensor [security]*
[10:04:09]
**[Step 6/8]* INFO: Reading UCFGs from: C:\BuildAgent\work\d09f7763a6e9e4f8\.sonarqube\out\.sonar\ucfg2\java*
[10:04:09]
**[Step 6/8]* INFO: UCFGs: 0, excluded: 0, source entrypoints: 0*
[10:04:09]
**[Step 6/8]* INFO: No UCFGs have been included for analysis.*
[10:04:09]
**[Step 6/8]* INFO: Sensor JavaSecuritySensor [security] (done) | time=4ms*
[10:04:09]
**[Step 6/8]* INFO: Sensor CSharpSecuritySensor [security]*
[10:04:09]
**[Step 6/8]* INFO: Reading UCFGs from: C:\BuildAgent\work\d09f7763a6e9e4f8\.sonarqube\out\ucfg_cs2*
[10:04:12]
**[Step 6/8]* INFO: UCFGs: 9813, excluded: 9508, source entrypoints: 305*
[10:04:12]
**[Step 6/8]* INFO: Analyzing 9813 ucfgs to detect vulnerabilities.*
[10:04:12]
**[Step 6/8]* INFO: rule: S2076, entrypoints: 0*
[10:04:12]
**[Step 6/8]* INFO: rule: S2076 done*
[10:04:12]
**[Step 6/8]* INFO: rule: S2078, entrypoints: 0*
[10:04:12]
**[Step 6/8]* INFO: rule: S2078 done*
[10:04:12]
**[Step 6/8]* INFO: rule: S2631, entrypoints: 227*
[10:04:15]
**[Step 6/8]* INFO: ------------------------------------------------------------------------*
[10:04:15]
**[Step 6/8]* INFO: EXECUTION FAILURE*
[10:04:15]
**[Step 6/8]* INFO: ------------------------------------------------------------------------*
[10:04:15]
**[Step 6/8]* INFO: Total time: 54.897s*
[10:04:15]
**[Step 6/8]* ERROR: Error during SonarQube Scanner execution*
[10:04:15]
**[Step 6/8]* INFO: Final Memory: 33M/644M*
[10:04:15]
**[Step 6/8]* INFO: ------------------------------------------------------------------------*
[10:04:15]
**[Step 6/8]* ERROR: null*
[10:04:15]
**[Step 6/8]* ERROR:*
[10:04:15]
**[Step 6/8]* The SonarQube Scanner did not complete successfully*