-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathphpcs.xml
More file actions
69 lines (69 loc) · 4.48 KB
/
phpcs.xml
File metadata and controls
69 lines (69 loc) · 4.48 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
<ruleset name="WordPressStandard">
<description>PHP 7.2 compatibility.</description>
<autoload>vendor/autoload.php</autoload>
<config name="testVersion" value="7.2"/>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>*/vendor-patched/*</exclude-pattern>
<exclude-pattern>*/Tests/*</exclude-pattern>
<exclude-pattern>/plugins/data-liberation/</exclude-pattern>
<exclude-pattern>/plugins/static-files-editor/</exclude-pattern>
<exclude-pattern>/plugins/git-repo/</exclude-pattern>
<exclude-pattern>/plugins/url-updater/</exclude-pattern>
<exclude-pattern>/bin/build-phar</exclude-pattern>
<exclude-pattern>/examples/</exclude-pattern>
<exclude-pattern>rector.php</exclude-pattern>
<exclude-pattern>components/CORSProxy/cors-proxy-functions.php</exclude-pattern>
<exclude-pattern>components/Markdown/bin/build/*</exclude-pattern>
<exclude-pattern>components/ToolkitCodingStandards/*</exclude-pattern>
<rule ref="PHPCompatibility">
</rule>
<rule ref="components/ToolkitCodingStandards/WordPressToolkitCodingStandards/ruleset.xml"/>
<rule ref="WordPress">
<!-- Aligning the 1500 lines of public_suffix_list.php adds a lot of unnecessary noise and then
the actual indentation is not even correct because the rule seems to cound bytes, not printable
UTF-8 characteds. -->
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
<exclude name="WordPress.PHP.IniSet.display_errors_Disallowed"/>
<exclude name="WordPress.Security.EscapeOutput.ExceptionNotEscaped"/>
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotValidated"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash"/>
<exclude name="WordPress.WP.AlternativeFunctions"/>
<exclude name="WordPress.WP.AlternativeFunctions.file_system_operations_fclose"/>
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedElse"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedWhile"/>
<!-- Unused arguments are necessary when inheriting from classes and overriding methods. -->
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="Generic.PHP.DiscourageGoto.Found"/>
<exclude name="PSR12.Files.FileHeader.IncorrectOrder"/>
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineAfter"/>
<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.WrongStyle"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamType"/>
<!-- "Parameter comment must end with a full stop" is such a pebble in the shoe. -->
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital"/>
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle"/>
<exclude name="Squiz.Commenting.FunctionCommentThrowTag"/>
<exclude name="Squiz.Commenting.VariableComment.Missing"/>
<exclude name="Squiz.Commenting.VariableComment.MissingVar"/>
<exclude name="Squiz.Operators.IncrementDecrementUsage.Found"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="Squiz.PHP.DisallowSizeFunctionsInLoops.Found"/>
<exclude name="Squiz.PHP.NonExecutableCode.Unreachable"/>
</rule>
</ruleset>