This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
104 lines (86 loc) · 3.98 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
99
100
101
102
103
104
<?xml version="1.0"?>
<ruleset name="WP-ENV-PHPCS">
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="parallel" value="75"/>
<arg value="p"/>
<!-- Don't worry about files that don't contain any code -->
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
<!-- warning for IniSet -->
<rule ref="WordPress.PHP.IniSet.display_errors_Blacklisted">
<severity>warning</severity>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.MissingUnslash">
<exclude-pattern>src/App/Http/AppHostManager.php</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
<exclude-pattern>src/App/Http/AppHostManager.php</exclude-pattern>
</rule>
<!-- Ignore mixed line-endings warnings -->
<rule ref="Internal.LineEndings.Mixed">
<severity>0</severity>
</rule>
<!-- Internal exceptions (often occur on minified files) -->
<rule ref="Internal.Tokenizer.Exception">
<severity>0</severity>
</rule>
<!-- For CI, don't fail on warnings -->
<config name="ignore_warnings_on_exit" value="1"/>
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
<exclude name="Generic.Classes.OpeningBraceSameLine.BraceOnNewLine"/>
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.Commenting.VariableComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Squiz.Commenting.LongConditionClosingComment.Invalid"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
</rule>
<rule ref="WordPress-Docs">
<!-- <severity>0</severity> -->
<exclude name="Generic.Commenting.DocComment.LongNotCapital"/>
<exclude name="Generic.Commenting.DocComment.ShortNotCapital"/>
</rule>
<rule ref="WordPress-Extra">
<exclude name="WordPress.Files.FileName"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<exclude name="WordPress.Security.NonceVerification.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<!-- exclude until we fix -->
<exclude name="WordPress.Security.EscapeOutput"/>
<!-- <exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/> -->
</rule>
<config name="minimum_supported_wp_version" value="4.7" />
<!-- maybe fix later -->
<rule ref="Squiz.Commenting">
<type>warning</type>
</rule>
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<type>warning</type>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited">
<type>warning</type>
</rule>
<rule ref="PHPCompatibilityWP" />
<config name="testVersion" value="7.3-"/>
</ruleset>