| 1 |
<?xml version="1.0"?> |
| 2 |
<ruleset name="Radio Station"> |
| 3 |
|
| 4 |
<!-- Based on 10up-Default Rulset --> |
| 5 |
<!-- https://raw.githubusercontent.com/10up/phpcs-composer/master/10up-Default/ruleset.xml --> |
| 6 |
|
| 7 |
<description>A Ruleset for checking Radio Station plugin.</description> |
| 8 |
|
| 9 |
<exclude-pattern>*/phpunit.xml*</exclude-pattern> |
| 10 |
<exclude-pattern>*/tests/*</exclude-pattern> |
| 11 |
<exclude-pattern>*\.(css|js)</exclude-pattern> |
| 12 |
|
| 13 |
<rule ref="Internal.NoCodeFound"> |
| 14 |
<severity>0</severity> |
| 15 |
</rule> |
| 16 |
|
| 17 |
<rule ref="Internal.LineEndings.Mixed"> |
| 18 |
<severity>0</severity> |
| 19 |
</rule> |
| 20 |
|
| 21 |
<rule ref="Internal.Tokenizer.Exception"> |
| 22 |
<severity>0</severity> |
| 23 |
</rule> |
| 24 |
|
| 25 |
<config name="ignore_warnings_on_exit" value="1"/> |
| 26 |
|
| 27 |
<rule ref="WordPress-Extra"> |
| 28 |
|
| 29 |
<!-- General Rules --> |
| 30 |
<exclude name="WordPress.Files.FileName"/> |
| 31 |
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/> |
| 32 |
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/> |
| 33 |
<exclude name="Squiz.Commenting.BlockComment.HasEmptyLine"/> |
| 34 |
<exclude name="Squiz.Commenting.BlockComment.LineIndent"/> |
| 35 |
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/> |
| 36 |
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/> |
| 37 |
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter"/> |
| 38 |
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/> |
| 39 |
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/> |
| 40 |
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/> |
| 41 |
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/> |
| 42 |
|
| 43 |
<!-- Strict Comparisons --> |
| 44 |
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/> |
| 45 |
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/> |
| 46 |
|
| 47 |
<!-- Overzealous Rules --> |
| 48 |
<exclude name="Squiz.PHP.CommentedOutCode.Found"/> |
| 49 |
<exclude name="Generic.Files.LineLength.TooLong"/> |
| 50 |
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/> |
| 51 |
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose"/> |
| 52 |
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen"/> |
| 53 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.ArrayItemNoNewLine"/> |
| 54 |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/> |
| 55 |
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/> |
| 56 |
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/> |
| 57 |
<exclude name="WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned"/> |
| 58 |
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned"/> |
| 59 |
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/> |
| 60 |
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/> |
| 61 |
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceBeforeOpenBrace"/> |
| 62 |
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/> |
| 63 |
|
| 64 |
<!-- Whitespace and Tab Warnings --> |
| 65 |
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd"/> |
| 66 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/> |
| 67 |
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/> |
| 68 |
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/> |
| 69 |
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/> |
| 70 |
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/> |
| 71 |
<exclude name="PEAR.WhiteSpace.ScopeIndent.Incorrect"/> |
| 72 |
<exclude name="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed"/> |
| 73 |
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found"/> |
| 74 |
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen"/> |
| 75 |
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/> |
| 76 |
<exclude name="Universal.Whitespace.DisallowInlineTabs.NonIndentTabsUsed"/> |
| 77 |
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/> |
| 78 |
|
| 79 |
<!-- Extra Exclude Rules --> |
| 80 |
<exclude name="Universal.ControlStructures.DisallowLonelyIf.Found"/> |
| 81 |
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_print_r"/> |
| 82 |
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_error_log"/> |
| 83 |
<exclude name="WordPress.Security.NonceVerification.Recommended"/> |
| 84 |
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found"/> |
| 85 |
<exclude name="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostIncrementFound"/> |
| 86 |
<exclude name="Universal.Operators.DisallowStandalonePostIncrementDecrement.PostDecrementFound"/> |
| 87 |
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed"/> |
| 88 |
|
| 89 |
<!-- Temporary: Remove Strictness --> |
| 90 |
<exclude name="Universal.Operators.StrictComparisons.LooseEqual"/> |
| 91 |
<exclude name="Universal.Operators.StrictComparisons.LooseNotEqual"/> |
| 92 |
|
| 93 |
</rule> |
| 94 |
|
| 95 |
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment"> |
| 96 |
<type>warning</type> |
| 97 |
</rule> |
| 98 |
<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited"> |
| 99 |
<type>warning</type> |
| 100 |
</rule> |
| 101 |
|
| 102 |
<rule ref="Generic.Formatting.DisallowMultipleStatements.SameLine"> |
| 103 |
<type>warning</type> |
| 104 |
</rule> |
| 105 |
<rule ref="WordPress.DB.PreparedSQL.NotPrepared"> |
| 106 |
<type>warning</type> |
| 107 |
</rule> |
| 108 |
<rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital"> |
| 109 |
<type>warning</type> |
| 110 |
</rule> |
| 111 |
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid"> |
| 112 |
<type>warning</type> |
| 113 |
</rule> |
| 114 |
<rule ref="WordPress.Security.EscapeOutput.OutputNotEscaped"> |
| 115 |
<type>warning</type> |
| 116 |
</rule> |
| 117 |
|
| 118 |
<!-- <rule ref="PHPCompatibilityWP" /> --> |
| 119 |
|
| 120 |
</ruleset> |
| 121 |
|