2
votes

Getting the following error in SonarQube while running the build from TeamCity

Caused by: Start pointer [line=239, lineOffset=1] should be before end pointer [line=239, lineOffset=1]

Updated the C# plugin, installed VB.net plugin and added the Scanner for MSBUILD latest version sonar-scanner-msbuild-2.2.0.24.

Still getting the error.

2
Even we were facing this issue. We were using sonar-csharp-plugin-5.5.0.479.jar. Then, we tried with sonar-csharp-plugin-5.3.2.jar and it worked. I guess it has something to do with the size of the project. Our project was having LOC 528,799. Thanks to my colleague Praveen Rekhapalli who found this workaround. Hope this helps. - Gupta Sandeepkumar

2 Answers

1
votes

Unfortunately we introduced a bug in the latest release. Here's the corresponding ticket: https://jira.sonarsource.com/browse/SONARCS-629. We're working on the fix.

As a workaround for the time being you can disable the rule that causes the issue. Can you confirm that in your case it is S105 (tab characters should not be used)?

0
votes

I stumbled in this issue while instrumenting a large .NET project: I'm using sonarqube 6.1 with SonarQube Scanner for MSBuild 2.2.0.24.

At first, I downloaded and installed the csharp plugin C# 5.5.0.479 copying the corresponding jar file into the sonarqube dedicated dir: THIS IS WRONG!

Reading into the MSBuild scanner documentation I learned that msbuild scanner provides itself the correct csharp handler, so, I stopped sonar, I went into sonarqube-6.1\extensions\plugins and I deleted the csharp related jar file. I restarted sonar and then I repeated the begin - build - end sequence and everything worked for me.

I hope this could be of help.