-1

Need to add codesniffer, psr-1, psr-2, pmd rules in sonarqube. I tried finding plugin but get sonar-php-codesniffer0.2 plugin which is compatible only upto sonarqube>2.0. Also there is no way to import custom php rules in sonarqube6.1 or updated versions. How can now i add these rules to sonarqube for code quality analysis?

YATIN GUPTA
  • 916
  • 9
  • 17
  • Please provide some solution – YATIN GUPTA May 25 '17 at 06:19
  • I am trying to make sonarqube plugin for it, please provide some link where i can get enough content to make plugin. Documentation is not enough to make plugin to add coding rules of PHP as mentioned above. – YATIN GUPTA May 25 '17 at 08:11

1 Answers1

1

You can create a new plugin which imports issues from other tools (like CodeSniffer) into SonarQube.

See for example https://github.com/SonarQubeCommunity/sonar-cppcheck or https://github.com/Designite/sonar-designite-plugin.

Moreover you can create your own custom rules (docs) for SonarPHP.

Note that SonarPHP already has some coverage for psr-1 and psr-2 (rules list).

Elena Vilchik
  • 1,085
  • 6
  • 11