SonarScanner: Publish quality gate result showing incorrect error

Versions:

  • SonarQube: Developer Edition Version 7.4 (build 18908)
  • SonarScanner: 4.7.2
  • DevOps Server: Dev17.M153.3

In SonarQube I’ve defined a default Quality Gate with the following settings:

  • Metric: Duplicated Lines on New Code (%)
    • On New Code: Always
    • Operator: is greater than
    • Error: 3.0%
  • Metric: New Blocker Issues
    • On New Code: Always
    • Operator: is greater than
    • Error: 0
  • Metric: New Critical Issues
    • On New Code: Always
    • Operator: is greater than
    • Error: 0

This quality gate is used by my projects.

When I start a Pull Request build in DevOps with a Sonar Analysis, the “Publish Quality Gate Result” shows an error in my Summary page with the following text:
SonarQube Analysis Report
Summ-IT 8 Backend Quality Gate Failed
Open Issues 109 > 0
Detailed SonarQube report >

When I look at the ‘Detailed SonarQube report’ I can’t see any reason for the Failed Quality Gate.

Am I missing something or is this a bug in the DevOps Extension?

Hi @Jowindebondt,

Are the issues mentionned in the “Open issues” are marked as critical or blocker ? That would one reason to fail the QG according to your profile.

Mickaël

Hi @mickaelcaro,

There are no blocking or critical issues. Only some majors or minors.

Hi,

I can see you’re using an unsopported version of SonarQube, I highly recommend you to upgrade to 7.9.X as a lot of bugs have been fixed.
Please upgrade, then check if your issue is still there.

Thanks