Created
August 27, 2020 12:57
-
-
Save Rarst/62fbcc5dd89a7b6a304242a7c72079a2 to your computer and use it in GitHub Desktop.
My personal PHPCS ruleset for WP projects.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="WordPress-Modified"> | |
<description>A custom coding standard.</description> | |
<rule ref="CognitiveComplexity.Complexity.MaximumComplexity"> | |
<properties> | |
<property name="maxCognitiveComplexity" value="5"/> | |
</properties> | |
</rule> | |
<rule ref="WordPress"> | |
<exclude name="WordPress.PHP.DiscouragedFunctions.Discouraged" /> | |
<exclude name="WordPress.PHP.DevelopmentFunctions" /> | |
<exclude name="WordPress.NamingConventions.ValidFunctionName" /> | |
<exclude name="WordPress.NamingConventions.ValidVariableName" /> | |
<!--<exclude name="WordPress.WP.PreparedSQL.NotPrepared" />--> | |
<exclude name="Generic.Commenting.DocComment.MissingShort" /> | |
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" /> | |
<exclude name="Squiz.Commenting.FileComment" /> | |
<exclude name="Squiz.Commenting.FunctionComment" /> | |
<exclude name="Squiz.Commenting.VariableComment" /> | |
<exclude name="Squiz.Commenting.ClassComment" /> | |
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter" /> | |
<exclude name="Squiz.PHP.CommentedOutCode.Found" /> | |
<exclude name="WordPress.Files.FileName" /> | |
<exclude name="Generic.Files.LowercasedFilename.NotFound" /> | |
<exclude name="PEAR.Functions.FunctionCallSignature" /> | |
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" /> | |
<exclude name="WordPress.WhiteSpace.PrecisionAlignment.Found" /> | |
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" /> | |
<exclude name="WordPress.DB.DirectDatabaseQuery" /> | |
</rule> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment