Line 1203 is out of range when scanning a C # file

We have a fairly large code base, and one of the projects breaks up the SonarQube analysis with the following error.

016-12-15T11:20:30.8989361Z ##[error]ERROR: Error during SonarQube Scanner execution 2016-12-15T11:20:30.8999277Z ##[error]java.lang.IllegalStateException: Line 1203 is out of range in the file Converters/IMSServiceToESBConverter.cs (lines: 1202) 

We use SonarQube 6.1 and the latest C # plugin (5.5.1.522).

Disabling all rules in a C # profile still causes this problem.

+6
source share
1 answer

I also ran into a similar issue when starting SonarQube with JaCoCo code distribution reports for Java code:

 ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Line [..] is out of range in the file [..] 

The problem arose because of an old code coverage report that was created before the code was updated. It has been fixed after receiving coverage reports. Therefore, please also make sure that the coverage reports from the previous run are cleared and the new coverage reports are in place.

+1
source

Source: https://habr.com/ru/post/1013184/


All Articles