SonarQube, PHP, Drupal, Codesniffer

192 views
Skip to first unread message

timrose...@googlemail.com

unread,
Jan 4, 2018, 4:03:52 AM1/4/18
to SonarQube

We recently managed to integrate SonarQube and the PHP extension. After some experienced time, we got used to knowing that there are differences between the rules of SonarPHP (Drupal) and the Code Sniffer rules provided by the Drupal community. This is not only settings thing because there are some rules missing. We would like to know if there is a migration path for those rules or if there is a possibility to write the checks in PHP instead of JAVA. 

alban....@sonarsource.com

unread,
Jan 4, 2018, 12:16:45 PM1/4/18
to SonarQube
Hi,

No, it's not possible to write checks in PHP. If you want to write custom rules for SonarPHP, the only supported language is java and the documentation is here: Custom Rules for PHP
But if there's some checks that you would like to have, you can contribute by writing descriptions and non-compliant/compliant code examples in this google group.

Alban
Reply all
Reply to author
Forward
0 new messages