Component key not found & Quality Gate false positive

  • ALM used (GitHub)
  • CI system used (Jenkins)
  • Scanner command used when applicable sonar-scanner -Dsonar.pullrequest.key=THE-KEY
sonar.projectKey=project_key
sonar.organization=organisation
sonar.host.url=https://sonarcloud.io

sonar.php.coverage.reportPaths=coverage-report-phpunit.xml
sonar.php.tests.reportPath=tests-report-phpunit.xml
sonar.sources=src
sonar.tests=tests

sonar.qualitygate.wait=true
sonar.scm.disabled=true
  • Languages of the repository (PHP)
  • Error observed (No error)

Hi! I have two issues, but Iā€™m not sure whether they are related to each other. First is the Component key not found on Sonarcloud UI, but the sonar scanner is passing through.

Secondly, we recently created new quality gate with code coverage for new code, and even though the UI shows that there is 0% coverage in the PR and the minimum required is ex. 90% the quality gate is still successful

It turns out that it was ā†’ Quality Gate Passed even if coverage is 0%

Really needs documenting that. The UI could use some warnin

1 Like

Hi Zbigniew, thanks for pointing this out. We will add a warning to the documentation.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.