Skip to content

Instantly share code, notes, and snippets.

@ChaseWiseman
Created April 27, 2017 23:22
Show Gist options
  • Save ChaseWiseman/329256b7c3974f899e3f47e09159a6d2 to your computer and use it in GitHub Desktop.
Save ChaseWiseman/329256b7c3974f899e3f47e09159a6d2 to your computer and use it in GitHub Desktop.
Sample SkyVerge WooCommerce coding standards
<?xml version="1.0"?>
<ruleset name="SkyVerge PHP Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes and plugins.</description>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Squiz.Operators.ValidLogicalOperators.NotAllowed" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Generic.WhiteSpace.ScopeIndent" /> <!-- This is a bit aggressive, but will have to do until we can figure out how to exclude sniffs for our odd indenting standard -->
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" /> <!-- This shouldn't be excluded, but it doesn't seem to work :( -->
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce-plugin-framework" /> <!-- Change this value on a per-plugin basis -->
</properties>
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="4.1" />
</properties>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment