Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
130 lines (108 loc) · 5.33 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
130 lines (108 loc) · 5.33 KB
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
<?xml version="1.0"?>
<ruleset name="wordlift-plugin">
<description>Check WordLift plugin.</description>
<rule ref="Jetpack">
<exclude name="Generic.Commenting.DocComment.LongNotCapital"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="Generic.Commenting.DocComment.ShortNotCapital"/>
<exclude name="Squiz.Commenting.BlockComment.HasEmptyLineBefore"/>
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.Commenting.ClassComment.SpacingAfter"/>
<exclude name="Squiz.Commenting.ClassComment.WrongStyle"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment"/>
<exclude name="Squiz.Commenting.FileComment.SpacingAfterOpen"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.Commenting.VariableComment.Missing"/>
<exclude name="Squiz.Commenting.VariableComment.MissingVar"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.SchemaChange"/>
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found"/>
<exclude name="WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath"/>
<!-- It seems the `prefixes` property isn't applied, therefore I had to exclude the rule: -->
<exclude name="WordPress.NamingConventions.PrefixAllGlobals"/>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="wlp_"/>
</properties>
</rule>
<rule ref="Jetpack.Functions.I18n">
<properties>
<property name="text_domain" value="wordlift,default"/>
</properties>
</rule>
<rule
ref="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<rule
ref="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
<exclude-pattern>src/js/dist/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodDoubleUnderscore">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<!-- Until PHPCompatibility 10.0 is released, we need to ignore this rule: -->
<rule
ref="PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__serializeFound">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<!-- Until PHPCompatibility 10.0 is released, we need to ignore this rule: -->
<rule
ref="PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound">
<exclude-pattern>*/modules/**/*</exclude-pattern>
<exclude-pattern>*/modules/**/includes/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="edit_wordlift_entities"/>
<element value="edit_wordlift_entity"/>
</property>
</properties>
</rule>
<config name="text_domain" value="wordlift,default"/>
<!-- Check for cross-version support for PHP 7.4 and higher. -->
<rule ref="PHPCompatibility"/>
<config name="minimum_supported_wp_version" value="5.3-"/>
<config name="testVersion" value="7.4-"/>
<arg name="extensions" value="php"/>
<!-- Show sniff codes in all reports. -->
<arg value="ps"/>
<!-- Scan it all! -->
<file>./src</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>src/libraries/action-scheduler/*</exclude-pattern>
<exclude-pattern>src/modules/*</exclude-pattern>
<exclude-pattern>*/ext/dependencies/*</exclude-pattern>
<exclude-pattern>*/modules/food-kg/includes/polyfills/mbstring.php</exclude-pattern>
<exclude-pattern>*/modules/**/scoper.inc.php</exclude-pattern>
</ruleset>