This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ruleset.xml
129 lines (100 loc) · 4.72 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0"?>
<!--
~ Sunny
~
~ Automatically purge CloudFlare cache, including cache everything rules.
~
~ @package Sunny
~
~ @author Typist Tech <sunny@typist.tech>
~ @copyright 2017 Typist Tech
~ @license GPL-2.0+
~
~ @see https://www.typist.tech/projects/sunny
~ @see https://wordpress.org/plugins/sunny/
-->
<ruleset name="PSR 2 and WordPress Coding Standards for Plugins">
<description>PSR 2 and WordPress Coding Standards for Plugins</description>
<file>./</file>
<config name="minimum_supported_wp_version" value="4.9"/>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>/build/*</exclude-pattern>
<exclude-pattern>/lib/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/release/*</exclude-pattern>
<exclude-pattern>/tests/_data/*</exclude-pattern>
<exclude-pattern>/tests/_output/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<rule ref="PSR2"/>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/sunny.php</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine"/>
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket"/>
<exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint"/>
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
<exclude name="WordPress.WhiteSpace.CastStructureSpacing.NoSpaceBeforeOpenParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="sunny"/>
</properties>
</rule>
<!--Tests-->
<rule ref="PEAR.Files.IncludingFile.UseRequire">
<exclude-pattern>*/_bootstrap.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.WrongStyle">
<exclude-pattern>*/_bootstrap.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.InlineComment.SpacingAfter">
<exclude-pattern>*/_bootstrap.php</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.RestrictedVariables">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.SuperGlobalInputUsage">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.ValidatedSanitizedInput">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
</ruleset>