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 2
/
Copy pathruleset.xml
134 lines (107 loc) · 4.89 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
130
131
132
133
134
<?xml version="1.0"?>
<!--
~ WP CloudFlare Guard
~
~ Connecting WordPress with Cloudflare firewall,
~ protect your WordPress site at DNS level.
~ Automatically create firewall rules to block dangerous IPs.
~
~ @package WPCFG
~
~ @author Typist Tech <[email protected]>
~ @copyright 2017 Typist Tech
~ @license GPL-2.0+
~
~ @see https://www.typist.tech/projects/wp-cloudflare-guard
~ @see https://wordpress.org/plugins/wp-cloudflare-guard/
-->
<ruleset name="PSR 2 and WordPress Coding Standards for Plugins">
<description>PSR 2 and WordPress Coding Standards for Plugins</description>
<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>
<exclude-pattern>/Gruntfile.js</exclude-pattern>
<rule ref="PSR2"/>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/*.php</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine"/>
<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.InvalidTypeHint"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint"/>
<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.DeprecatedClasses">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedParameters">
<properties>
<property name="minimum_supported_version" value="4.7"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-cloudflare-guard"/>
</properties>
</rule>
<!--Tests-->
<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="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>