Skip to content

Instantly share code, notes, and snippets.

@josephdpurcell
Created March 3, 2016 21:32
Show Gist options
  • Save josephdpurcell/73d0b6f1f8b31dec5d5b to your computer and use it in GitHub Desktop.
Save josephdpurcell/73d0b6f1f8b31dec5d5b 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