Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@drnikki
Forked from therealssj/phpmd_drupal_ruleset.xml
Created February 21, 2017 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnikki/a05ca967a35106fd6e2cf9aa15f2c817 to your computer and use it in GitHub Desktop.
Save drnikki/a05ca967a35106fd6e2cf9aa15f2c817 to your computer and use it in GitHub Desktop.
PHP Mess Detector Ruleset for Drupal.
<?xml version="1.0"?>
<ruleset
name="PMD Ruleset for Drupal"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"
>
<rule ref="rulesets/unusedcode.xml" />
<rule ref="rulesets/codesize.xml">
<exclude name="ExcessiveMethodLength" />
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<properties>
<property name="minimum" value="150" />
</properties>
</rule>
<rule ref="rulesets/cleancode.xml" />
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects" />
</rule>
<rule ref="rulesets/design.xml/CouplingBetweenObjects" />
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="minimum" value="2" />
<property name="exceptions" value="id" />
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
<properties>
<property name="maximum" value="30" />
</properties>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment