0
votes

I am running Sonar-Scanner through Jenkins and unable to get the analysis successful for .Net solution. Below is the attached screenshot of the error.

enter image description here

The error shows that ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Line 295 is out of range in the file (...) (lines: 294)

But there are only 294 lines in this file.

I am using below versions: sonar-scanner-msbuild-3.0.2.656 sonarqube-6.6

1
What coverage tool are you using? And when are you generating the coverage report files that SonarQube is reading? - Fabrice - SonarSource Team
Maybe a problem with the source file encoding? - Jeroen Heier
We are using codecoverage.exe which we get from the Visual Studio Enterprise - satelli rakesh

1 Answers

2
votes

I had the same issue with bamboo and dotnet-core.

It occured with a file that went down on number of lines. The problem seemed to be that sonar was using the cache, thats why it looked for a line out of range.

The solution in my case was,in bamboo jargon, to force a clean build, or in jenkins jargon, execute on a clean workspace .