jaystan
(Jason Stanley)
September 29, 2022, 8:15pm
1
Upgrade from SQ 7.9.1 LTS to 8.9.9 LTS
Post upgrade, we no longer have coverage measures.
Here is a snip from a scan running 7.9.1:
INFO: Sensor SonarJS Coverage [javascript]
INFO: 181/181 source files have been analyzed
INFO: Analysing [/home/****/jenkins/workspace/********/dist/build/rpmbuild/coverage/lcov.info]
When I look at the output from a 8.9.9 scan, I dont see this information.
Any advice on where I can start looking to debug this problem?
Colin
(Colin)
October 3, 2022, 8:06am
2
Hey there.
Do you find any information about coverage import in the logs?
When coverage data isn’t appearing as expected in SonarQube Server / Community Build or SonarQube Cloud, the first place you should look is the scanner logs.
Where do I find the scanner logs?
This will likely be broken out into its own guide soon
The Scanner logs are the output of executing one of the scanners , either directly or wrapped by one of many integrations, such as the SonarScanner for Jenkins , SonarScanner for Azure DevOps , SonarQube /SonarCloud GitHub Actions or SonarQube /…
jaystan
(Jason Stanley)
October 3, 2022, 11:10am
3
Hi Colin
The scan output can be found in the post below. I am wondering if the coverage is missing due to JavaScript not getting scanned.
I have multiple projects that contain both JS and CSS language that are now missing coverage measures.
SonarQube – 8.9.9 LTS
SonarScanner - 4.7.0.2747
I have a project that contains JavaScript and CSS code.
When I run a scan, only the CSS code is scanned, the JS code is not included in analysis.
SQ 7.9.1 LTS was working.
Please advise.
sonar-project.properties file contains the following:
sonar.sources=dist/build/rpmbuild/BUILD/app-2.0.1/src
sonar.branch.name=master
$ find . -name *.js | wc -l
259
$ find . -name *.scss | wc -l
71
**Command:**
$ sonar-scanner -Dsonar.host.url=https://…
Colin
(Colin)
October 3, 2022, 1:08pm
4
That’s going to be the root of the issue – the coverage sensor won’t run if no relevant files are found. I suggest focusing on that thread.