The sonarqube scan is showing significantly lower test coverage than the local run even though the files to be excluded in coverage is configured in

Must-share information (formatted with Markdown):

  • which versions are you using - SonarQube Community EditionVersion 8.4.2 (build 36762), Sonar Scanner
  • what are you trying to achieve - Coverage report should match between local test coverage report and sonarqube coverage report.
  • what have you tried so far to achieve this - Added exclusiong paths but still no luck see below
    sonar.coverage.exclusions= /home/jenkins/.local/**/, **/tests/, /migrations/, */, /settings/, /,, **/config/, */, */, */, */


Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.4.2 → 8.9.8 → 9.4 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.