Sonar-maven-plugin: fail fast

Is there a possibility to make sure sonar-maven-plugin will fail fast in case on troubles?

Example: we had a new Jenkins slave node, without NodeJS installed.
Our analyzing was passed and just errors in logs and warnings in SonarCloud UI were issued:

[ERROR] CSS rules were not executed. Error when running: ‘node -v’. Is Node.js available during analysis?

however they were missed and thus some of our pull requests didn’t have CSS quality checks.

Is it possible to fail the sonar-maven-plugin execution in such case?

Hi @lrozenblyum ,
Thank you for your request.
We need to check if such option even exists in SonarCloud.
We will eventually come back to you with the answer, when we find it! :stuck_out_tongue:

1 Like

hey @lrozenblyum ,
we eventually got a response from our engineering team :slight_smile: I will copy/paste it as is :

it’s not possible, for one reason : Analyzers are run in a certain order, sequentially.
They are not running any sanity checks at the beginning, nor the scanner does. So it’s kinda hard to check every property needed by each of these analyzers i guess for the moment.

hope it answers your question :wink:
Kind regards,

Hi @Christophe_Havard I understand that concern that it’s not known before the analyzing that some property is missing.

However is it possible for analyzer to report a fatal error if such situation occurs DURING the analyzing (so not just log error) in order for CI to fail and thus to know about the issue as soon as possible?