standards/gios/GIOS/ruleset.xml
<?xml version="1.0"?>
<ruleset name="Gios Standard">
<!-- Use WordPress Standards -->
<rule ref="WordPress">
<!-- File comments are useless -->
<exclude name="Squiz.Commenting.FileComment"/>
<!-- Variable comments are useless -->
<exclude name="Squiz.Commenting.VariableComment"/>
<!-- Function comments are useless for tests -->
<exclude name="Squiz.Commenting.FunctionComment">
<exclude-pattern>*/tests/*</exclude-pattern>
</exclude>
<!-- We can enable the following later later -->
<exclude name="Squiz.Commenting.BlockComment.NoCapital"/>
<exclude name="Squiz.Commenting.InlineComment.NotCapital"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter"/>
<!-- Don't worry about discouraged WordPress functions -->
<exclude name="WordPress.PHP.DiscouragedFunctions"/>
<exclude name="WordPress.VIP.RestrictedFunctions"/>
<exclude name="WordPress.VIP.TimezoneChange"/>
<exclude name="Generic.PHP.NoSilencedErrors"/>
<exclude name="WordPress.WP.EnqueuedResources"/>
<exclude name="WordPress.VIP.SlowDBQuery"/>
<exclude name="WordPress.VIP.SuperGlobalInputUsage"/>
<exclude name="WordPress.VIP.ValidatedSanitizedInput"/>
<exclude name="WordPress.CSRF.NonceVerification"/>
<!-- Exclude WordPress Core Whitespace checks -->
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
<exclude name="Generic.WhiteSpace.ScopeIndent"/>
<!-- Exclude WordPress escaping functions -->
<exclude name="WordPress.XSS.EscapeOutput" />
<!-- Exclude the most controversial "accepted" rule -->
<exclude name="WordPress.PHP.YodaConditions" />
</rule>
<!-- Force 2 spaces -->
<rule ref="GIOS.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
<property name="exact" value="true"/>
</properties>
</rule>
<!-- Braces on the same line -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie">
<property name="checkClosures" value="true" />
</rule>
<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"/>
<!-- phpspec likes files named with TitleCase -->
<rule ref="Generic.Files.LowercasedFilename">
<exclude-pattern>*/test/spec/*</exclude-pattern>
</rule>
<!-- TODO write a rule for opening brace must be on same line as class declaration -->
<!-- TODO write a rule for no empty lines after function declaration -->
<!-- TODO write a rule for no empty lines at end of function body -->
<!-- TODO sniff array spacing -->
<!-- TODO sniff array key values line up -->
</ruleset>