No 'Code Coverage' decorations in SonarQube 5.1+

264 views Asked by At

I've installed SonarQube 5.1 (and now 5.1.1 as a desperate move) on a Redhat 6 but I can't see any code-coverage decorations in the files itself. I've successfully did en maven-jacoco-sonar-build and I can see everything in Sonarqube (even the code coverage percentages per package/file) but when I view the files itself there are no red/green lines present.

Things I've checked/done so far:

  • I'm logged in as administrator
  • I did an API call coverage/show?from=1&to=100&key=... and I see the lines, in the resultset, that are covered (the second argument in every element). The data is clearly present in the database.
  • I've checked the permissions in "Security", specifically the 'Project Settings' (because I've encountered quite a few google hits with bugs in that area) and "Anyone,..." has the proper permissions to "Browse" en "See Source code"
  • When I look at the source code of the page I see clearly a div for the scm/duplication-check/... but there are no for "coverage". It seems like Sonarqube comes up empty when it searches for coverage.

Has anyone an idea how to fix this?

1

There are 1 answers

0
Fabrice - SonarSource Team On

It looks like your Elasticsearch cache is corrupted or at least not up-to-date.

To fix this:

  • Stop SQ
  • Delete the <install_dir>/data/es folder
  • Restart SQ