iam trying to get the code-coverage from my ember-addon project into sonarqube. The CodeCoverage is created with ember-cli-blanket. The LCOV File, which can be imported by the SonarQube runner is created and filled with coverage data, but sonarrunner (inside of jenkins) is printing the following error:
SonarQube Runner 2.3
...
15:53:29.949 INFO - Analysing [/home/build/.jenkins/workspace/$projectname$/$home_dir$/lcov.dat]
15:53:29.970 WARN - Could not resolve 206 file paths in [/home/build/.jenkins/...
first unresolved path: $projectname$/helpers/concat
The Job is Configured to execute the following command in the shell:
ember test --test-page='tests/index.html?hidepassed&coverage=true'
When i explore the project, the directory structure is as follows:
-- $projectname$
|
|-- app
|
|-- helpers
|
| - concat.js
The LCOV File, looks like this:
SF:$projectname$/helpers/concat.js
DA:1,1
DA:2,1
...
LF:9
LH:9
end_of_record
Well, of course SonarRunner does not find the file on the path reported in the LCOV File.
How can i configure this, so that the path in the lcov file is corret?
cheers.
So, i posted this question on github and got an answer. The solution is, to use "sed" to manually edit the lcov output. In my case, the command looks as follows:
sed -i -- 's/SF:$oldName$\/\(.*\)/SF:$newName$\/$newPath$\/\1.js/' lcov.dat
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.