-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathruleset.xml
84 lines (75 loc) · 3.5 KB
/
ruleset.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0"?>
<ruleset name="My first PHPMD rule set"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
My custom rule set that checks my code...
</description>
<!--
Import the entire cyclomatic complexity rule and
customize the rule configuration.
-->
<rule ref="CyclomaticComplexity">
<priority>1</priority>
<properties>
<property name="reportLevel" value="5" />
</properties>
</rule>
<!-- Import entire naming rule set and exclude rules -->
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
</rule>
<!-- Import entire clean code rule set, modify StaticAccess rule -->
<rule ref="rulesets/cleancode.xml">
<exclude name="StaticAccess" />
</rule>
<!--rule ref="PSR12">
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose" />
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore" />
<exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter" />
<exclude name="PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeColon" />
<exclude name="PEAR.ControlStructures.MultiLineCondition.StartWithBoolean" />
<exclude name="PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace" />
</rule-->
<rule ref="PSR12">
</rule>
<!--rule ref="Squiz">
<exclude name="Squiz.Commenting.ClosingDeclarationComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Files.FileExtension.ClassFound" />
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue" />
<exclude name="Squiz.Operators.ComparisonOperatorUsage.NotAllowed" />
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison" />
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen" />
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose" />
<exclude name="Squiz.WhiteSpace.FunctionOpeningBraceSpace.SpacingAfter" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.After" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.AfterLast" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before" />
<exclude name="Squiz.WhiteSpace.FunctionSpacing.BeforeFirst" />
</rule-->
<rule ref="Squiz">
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison" />
<exclude name="Squiz.WhiteSpace.FunctionOpeningBraceSpace.SpacingAfter" />
</rule>
<rule ref="rulesets/cleancode.xml/StaticAccess">
<properties>
<property name="exceptions">
<value>
\DateTime,
\DateInterval,
\DateTimeZone
</value>
</property>
</properties>
</rule>
</ruleset>