SonarQube scanner failing with line out of range
In general, this issue occurred with one file that went down on number of lines, then sonar use the cache, that is why it looked for a line out of range.
Just like user1014639 said:
The problem was due to the old code coverage report that was generated
before updating the code. It was fixed after generating coverage
reports again. So, please also make sure that the any coverage reports
that are left behind from the previous run are cleared and new
coverage reports are in place.
So, please try to run the command line:
mvn clean test sonar:sonar
to clean the old report.
Besides, if above not help you, you should make sure analyzed source code is strictly identical to the one used to generate the coverage report:
Check this thread for some details.
Hope this helps.