PHP Missing Rules that PHP CS Fixer finds


(Koen Hendriks) #1

I’ve set up SonarQube with PHP PSR2 rules but it misses rules that are marked by PHP CS Fixer.

This is the code smell I created deliberately to see a code smell in SonarQube:

08

This should find multiple issues.

  • Opening brace must be the last content on the line
  • Multi-line function call not indented correctly; expected 8 spaces but found 12
  • Multi-line function call not indented correctly; expected 4 spaces but found 8.

None of these are marked as smells, but my IDE does notice these rules.
I’ve configured SonarQube with the appropriate rules.
Is there anything what I’m missing? Why isn’t SonarQube showing the smells?

Edit: I added some screenshots but im only allowed to upload 1 image…


(Koen Hendriks) #2

Screenshot of my ide findings using PHP CS Fixer:

48


(Koen Hendriks) #3

Quality profile in use:

50

Sorry for the triple post but i couldn’t add more screenshots to the first.