# Quality gate check behaviour changed as part of running c++ sonar-scanner

**URL:** <https://community.sonarsource.com/t/quality-gate-check-behaviour-changed-as-part-of-running-c-sonar-scanner/40566>\
**Category:** SonarQube Server / Community Build\
**Created:** [March 23, 2021, 11:45pm UTC](https://community.sonarsource.com/t/quality-gate-check-behaviour-changed-as-part-of-running-c-sonar-scanner/40566 "2021-03-23T23:45:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamal\_Chandra](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/kamal_chandra/32/7605_2.png) [@Kamal\_Chandra](https://community.sonarsource.com/u/Kamal_Chandra)\
**Post date:** [March 23, 2021, 11:45pm UTC](https://community.sonarsource.com/t/quality-gate-check-behaviour-changed-as-part-of-running-c-sonar-scanner/40566/1 "2021-03-23T23:45:01Z")

</div>

After upgrading SonarQube Server from version 8.5 to 8.7 we noticed that the behaviour of “sonar-scanner” changed.

I am running scans on C++ projects and using SonarScanner 4.6.0.2311, sonarQube server 8.7.1 and with latest build wrapper provided for c++.

Previous behaviour:  
As part of sonar-scanner command it was performing the quality gate check and throwing an exception if there was a failure. We relied on this behaviour to fail our build.

New behaviour:  
It seems it does not check for quality gate failure as part of sonar-scanner command and hence all builds are always passing even though we have new issues which fails the quality gate.

Questions:

1. Was this intentional change or is this a real bug?
2. If it is intentional, what do you recommend using instead? web interface to poll the quality gate? I was doing this before to get the failure.
3. It makes sense to check the quality gate as part of the command line “sonar-scanner” so that we can rely on the exist code. Also we dont have to polling with other web commands. Can we get this feature back please?
4. Is there a new settings/options that I can set to get this feature back?

Note: we are doing everything from command line and not using any plugins for Jenkins etc.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 2, 2021, 3:30pm UTC](https://community.sonarsource.com/t/quality-gate-check-behaviour-changed-as-part-of-running-c-sonar-scanner/40566/2 "2021-04-02T15:30:58Z")

</div>

Hi,

> [@Kamal\_Chandra](#):
>
> As part of sonar-scanner command it was performing the quality gate check and throwing an exception if there was a failure.

Are you sure you weren’t doing this in 8.5 via a community plugin that maybe didn’t get re-installed in the upgrade? We don’t provide anything that “throws an exception”.

&nbsp;  
Ann
