forked from johngodley/redirection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
98 lines (85 loc) · 3.72 KB
/
phpcs.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Gutenberg Plugin">
<description>Coding standard for Redirection plugin. Based on WordPress coding standards, but without the annoying Yoda and alignment options</description>
<file>./models</file>
<file>./modules</file>
<file>./matches</file>
<file>./fileio</file>
<file>./database</file>
<file>./api</file>
<file>./redirection-admin.php</file>
<file>./redirection-capabilities.php</file>
<file>./redirection-front.php</file>
<file>./redirection-settings.php</file>
<file>./redirection.php</file>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="5.6"/>
<!-- Include rulesets -->
<rule ref="VariableAnalysis"/>
<!-- -->
<!-- Disabled rules -->
<!-- -->
<rule ref="Generic.Commenting">
<exclude name="Generic.Commenting"/>
</rule>
<rule ref="Generic.CodeAnalysis">
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
</rule>
<rule ref="Generic.Arrays">
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="Generic.Arrays.DisallowLongArraySyntax.Found"/>
</rule>
<rule ref="Generic.Formatting">
<exclude name="Generic.Formatting.MultipleStatementAlignment"/>
<exclude name="Generic.Formatting.NoSpaceAfterCast.SpaceFound"/>
</rule>
<rule ref="Squiz.Commenting">
<exclude name="Squiz.Commenting"/>
</rule>
<rule ref="Squiz.PHP">
<exclude name="Squiz.PHP.Heredoc.NotAllowed"/>
<exclude name="Squiz.PHP.DisallowInlineIf.Found"/>
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure"/>
<exclude name="Squiz.PHP.GlobalKeyword.NotAllowed"/>
<exclude name="Squiz.PHP.DisallowBooleanStatement.Found"/>
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedBool"/>
</rule>
<rule ref="Universal.Arrays">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="WordPress">
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
<exclude name="WordPress.Arrays.MultipleStatementAlignment"/>
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash"/>
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
<exclude name="WordPress.Security.EscapeOutput.HeredocOutputNotEscaped"/>
<exclude name="WordPress.WP.CapitalPDangit"/>
<exclude name="WordPress.WP.DeprecatedFunctions"/>
<exclude name="WordPress.WP.I18n.NoHtmlWrappedStrings"/>
</rule>
<!-- -->
<!-- Customizations -->
<!-- -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable">
<type>error</type>
</rule>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<properties>
<property name="allowUnusedCaughtExceptions" value="true"/>
<property name="allowUndefinedVariablesInFileScope" value="true"/>
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customAutoEscapedFunctions" type="array">
<element value="html_output"/>
</property>
</properties>
</rule>
</ruleset>