Skip to content

Commit

Permalink
Dev: Fetch phpmd and phpcs rulesets from develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed May 23, 2018
1 parent 8947e3d commit 33eb43b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/rulesets/phpcs_ruleset.xml
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<ruleset name="PSR2R">
<rule ref="PSR2">
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
</rule>
</ruleset>
20 changes: 20 additions & 0 deletions tests/rulesets/phpmd_ruleset.xml
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<ruleset name="LimeSurvey PHPMD Extension ruleset">
<rule ref="rulesets/unusedcode.xml" />

<!-- TODO: More customization might be necessary to make it usable. -->
<rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
<rule ref="rulesets/codesize.xml/NPathComplexity" />
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength" />
<rule ref="rulesets/codesize.xml/ExcessiveParameterList" />
<rule ref="rulesets/codesize.xml/ExcessivePublicCount" />
<rule ref="rulesets/codesize.xml/TooManyFields" />
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" />

<rule ref="rulesets/codesize.xml/ExcessiveClassLength">
<properties>
<!-- Set to 2000 -->
<property name="minimum" description="The class size reporting threshold" value="2000"/>
</properties>
</rule>
</ruleset>

0 comments on commit 33eb43b

Please sign in to comment.