Hi

Is there someone who have compatible rule sets for Backdrop - I know there is backdrop/coder project but it is for phpcs version <2 and I'm using >3 which I cannot change for sake of other projects.

Currently I'm using rule set from Drupal:

<ruleset name="BackdropCMS">
<description>Default PHP CodeSniffer configuration for Examples for Developers.</description>
<file>.</file>
<arg name="extensions" value="css,inc,install,module,php,profile,test,theme"/>
<rule ref="Drupal.Array"/>
<rule ref="Drupal.CSS"/>
<rule ref="Drupal.Classes"/>
<rule ref="Drupal.Commenting">
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
<!-- TagsNotGrouped has false positives for @code/@endcode. See
https://www.drupal.org/node/2502837 -->
<exclude name="Drupal.Commenting.DocComment.TagsNotGrouped"/>
<!-- We have to document hooks in a non-standard way in order to beinformative -->
<exclude name="Drupal.Commenting.HookComment.HookParamDoc"/>
<exclude name="Drupal.Commenting.HookComment.HookReturnDoc"/>
</rule>

But i'm not sure if it is fully complain with Backdrop CS.

If someone can drop rule set will be nice.

Accepted answer

Testing on this branch would be great:

Comments

As Laryn pointed out, I have been working on an update to the sniffs that works with phpcs ^3.0. There are still a few things that I know are not working yet, such as parsing of doc blocks, so that may cause some problems.

If you want to test it and report any problems you run across, then please put them in this issue https://github.com/backdrop-contrib/coder_review/issues/12.