forked from wp-plugins/radio-station
-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
phpcs.xml
119 lines (100 loc) · 5.23 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0"?>
<ruleset name="Radio Station">
<!-- Based on 10up-Default Rulset -->
<!-- https://raw.githubusercontent.com/10up/phpcs-composer/master/10up-Default/ruleset.xml -->
<description>A Ruleset for checking Radio Station plugin.</description>
<exclude-pattern>*/phpunit.xml*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*\.(css|js)</exclude-pattern>
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
<rule ref="Internal.LineEndings.Mixed">
<severity>0</severity>
</rule>
<rule ref="Internal.Tokenizer.Exception">
<severity>0</severity>
</rule>
<config name="ignore_warnings_on_exit" value="1"/>
<rule ref="WordPress-Extra">
<!-- General Rules -->
<exclude name="WordPress.Files.FileName"/>
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.Commenting.BlockComment.HasEmptyLine"/>
<exclude name="Squiz.Commenting.BlockComment.LineIndent"/>
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/>
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<!-- Strict Comparisons -->
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/>
<!-- Overzealous Rules -->
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose"/>
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen"/>
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine"/>
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
<exclude name="WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned"/>
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned"/>
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceBeforeOpenBrace"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
<!-- Whitespace and Tab Warnings -->
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/>
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
<exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect"/>
<exclude name="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed"/>
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen"/>
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>
<exclude name="Universal.Whitespace.DisallowInlineTabs.NonIndentTabsUsed"/>
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
<!-- Extra Exclude Rules -->
<exclude name="Universal.ControlStructures.DisallowLonelyIf.Found"/>
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_print_r"/>
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_error_log"/>
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found"/>
<exclude name="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound"/>
<exclude name="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostDecrementFound"/>
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed"/>
<!-- Temporary: Remove Strictness -->
<exclude name="Universal.Operators.StrictComparisons.LooseEqual"/>
<exclude name="Universal.Operators.StrictComparisons.LooseNotEqual"/>
</rule>
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<type>warning</type>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited">
<type>warning</type>
</rule>
<rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine">
<type>warning</type>
</rule>
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
<type>warning</type>
</rule>
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
<type>warning</type>
</rule>
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
<type>warning</type>
</rule>
<rule ref="WordPress.Security.EscapeOutput.OutputNotEscaped">
<type>warning</type>
</rule>
<!-- <rule ref="PHPCompatibilityWP" /> -->
</ruleset>