-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allan Collins
committed
Oct 5, 2015
1 parent
39ddc1f
commit 402894b
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WPized Project"> | ||
<description>A custom set of rules to check for a WPized WordPress project</description> | ||
|
||
<exclude-pattern>/docroot/wp-admin/*</exclude-pattern> | ||
<exclude-pattern>/docroot/wp-includes/*</exclude-pattern> | ||
<exclude-pattern>/docroot/wp-*.php</exclude-pattern> | ||
<exclude-pattern>/docroot/index.php</exclude-pattern> | ||
<exclude-pattern>/docroot/xmlrpc.php</exclude-pattern> | ||
<exclude-pattern>/docroot/wp-content/plugins/*</exclude-pattern> | ||
|
||
<rule ref="Squiz.PHP.CommentedOutCode"/> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/> | ||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> | ||
<!--<rule ref="Generic.Commenting.Todo"/>--> | ||
<rule ref="Generic.ControlStructures.InlineControlStructure"/> | ||
|
||
<!-- | ||
We may also want to to include all the rules in a standard | ||
--> | ||
|
||
<rule ref="WordPress"> | ||
|
||
<!-- | ||
We may want a middle ground though. The best way to do this is add the | ||
entire ruleset, then rule by rule, remove ones that don't suit a project. We | ||
can do this by running `phpc ` with the '-s' flag, to see the names of the | ||
different Sniffs, as their rules are broken. From here, we can opt to | ||
exclude problematic sniffs like so. | ||
<exclude name="WordPress.XSS.EscapeOutput" /> | ||
--> | ||
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" /> | ||
<exclude name="Generic.Commenting.Todo.TaskFound" /> | ||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> | ||
<exclude name="Squiz.PHP.CommentedOutCode.Found" /> | ||
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" /> | ||
<exclude name="WordPress.Classes.ValidClassName" /> | ||
<exclude name="PEAR.Functions.FunctionCallSignature" /> | ||
<exclude name="WordPress.Files.FileName" /> | ||
<exclude name="WordPress.Arrays.ArrayDeclaration" /> | ||
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions" /> | ||
<exclude name="WordPress.Functions.FunctionDeclarationArgumentSpacing" /> | ||
<exclude name="Squiz.Strings.DoubleQuoteUsage" /> | ||
<exclude name="WordPress.WhiteSpace.OperatorSpacing" /> | ||
<exclude name="WordPress.WhiteSpace.PhpIndent.Incorrect" /> | ||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" /> | ||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" /> | ||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" /> | ||
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" /> | ||
<exclude name="Generic.WhiteSpace.ScopeIndent" /> | ||
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" /> | ||
<exclude name="WordPress.NamingConventions.ValidFunctionName" /> | ||
<exclude name="WordPress.PHP.YodaConditions" /> | ||
<!--<exclude name="WordPress.VIP" /> | ||
<exclude name="WordPress.PHP" /> | ||
<exclude name="WordPress.XSS" />--> | ||
|
||
</rule> | ||
</ruleset> |