File parse error don't make the gate fail


(al) #1
  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube : 7.1.0.11001, SonarPhp : 2.13.0.3107, SonarQube Scanner 3.1.0.1141

  • what are you trying to achieve

When my project is analyzed (in preview mode), in the log of sonarscanner i get a file parse error because one of the developper forgot a closing brace. The analyze keep on and my gateway passed. I would like to get notify that I have one file that can’t be analyzed and that it generate a issue or at least that the gate fails.

Thanks in advance for any help.

Best regards.

Al


(Michael Gumowski) #2

Hello Al,

You could maybe enable rule S2260 - PHP parser failure, which is not part of default Sonar Way profile for PHP, and configure its severity in order to make your quality gate fail.

Cheers,
Michael


(al) #3

Hello Michael,

Thanks a lot for your reply. Didn’t see that rule, i’m going to try this.

Regards.

Al