Question about SonarQube Rules

Hello Guys, good Afternoon.

I want to know something.

I was integrating my SonarQube with some typescript code, and when I executed my scan I received a “Execution Success” message.

After this I opened to see the analysis but I saw that I had 4 major bugs, nothing that crashes my application.

I want to know if is possible to add any rule or something that when the SonarQube finds a Bug, a Security Flaw or any of these errors, he pops an “Execution Failed” instead of “Execution Success”.

In a more basic explanation I only want SonarQube to pop a “Execution Success” message if literally nothing has been found on my code, no errors, nothing, otherwise I would like to pop a “Execution Failed” message at the final of SonarQube-Scanner npm module.

I would like to squeeze more to let my code perfect at the SonarQube’s eyes.

There is any ways?

Thanks a lot!

Hi @BrOaDWiNK,

The calculation of quality gate success/failure actually occurs on the SonarQube server after your analysis is completed as part of the build.

If you’re running your analysis as part of a CI pipeline like Jenkins or GitLab, we have mechanisms covered in our documentation for having the pipeline wait on the final quality gate result and then proceeding accordingly depending up on the success/failure result. We generally try to discourage users from failing the scan or build based on a negative quality result, because your build did not truly fail in such circumstances – it simply gave you some information for you to act upon.

Hope this helps,
Jeff