versions used - SonarQube 8.1, NPM sonar-scanner v3.1.0
java.lang.IllegalArgumentException: 9 is not a valid line offset for pointer. File src/app/components/package.component.ts has 7 character(s) at line 106- This is caused by https://github.com/SonarSource/sonarqube/blob/5c2e35eb1b4c315b29b7e91a9921633873327347/sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java#L41
The exception is not propagated properly and does not stop current Sonar scan with failure.
Moreover, the execution continues with
and results in
So, here I’ve got the following question - why after calling the checkArgument() method from the above mentioned file I’ve posted a link to, the execution isn’t failing due to the exception?
- steps to reproduce - Create a file that hasn’t a proper line ending (let’s say mix of CLRF) or not UTF-8 compliant symbols (like a Cyrillic symbol}
- I’ve not found any potential workaround, as this actually breaks the implementation of the Sonar scan - on one hand we have an exception, the application does not finish file analysis execution properly, which results in absolutely no test coverage reported to the SonarQube instance.