I searched a lot for this specific error, but I had no chance in finding a suitable answer.
I have SonarQube 5.4 and using newest Karma-version.
Following error occurs when running sonar-runner:
INFO: Analysing /Users/foo/repository/BarJS/test/reports/coverage/lcov.info
INFO: Could not resolve 6 file paths in lcov.info, first unresolved path: /Users/foo/repository/BarJS/test/spec/Classname.test.js
While foo is my username and BarJS is the name of the project.
Other people getting those errors having mispelled or case-specific or relative paths. I checked half a dozen times. My paths are correct.
I have absolute paths in my Karma lcov.info-file. All camelcase letters are equal to their path in Finder.
Content of Karmas lcov.info
SF:/Users/foo/repository/BarJS/test/spec/Classname.test.js
Anybody out there having same issue? It is really annoying
In my case, the solution was to add
sonar.tests=test/spec
to my sonar.properties. Now it is working like a charm
@ElenaVilchik: many thx for your direction, helped a lot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With