stevegrunwell/schemify

View on GitHub
phpcs.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<!--
    Customize the rules WP Enforcer uses by editing this file according to PHP_CodeSniffer's
    ruleset.xml standard: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
-->
<ruleset name="Schemify">
    <description>Coding standards for Schemify.</description>

    <!-- FILES -->
    <exclude-pattern>*/node_modules/*</exclude-pattern>
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>tests/coverage/*</exclude-pattern>
    <exclude-pattern>tests/data/*</exclude-pattern>
    <exclude-pattern>Gruntfile.js</exclude-pattern>

    <!-- Schemas won't match WordPress standards, and that's okay -->
    <rule ref="Generic.Files.LowercasedFilename.NotFound">
        <exclude-pattern>includes/schemas/*</exclude-pattern>
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="Squiz.Commenting.ClassComment.Missing">
        <exclude-pattern>includes/schemas/*</exclude-pattern>
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="Squiz.Commenting.FunctionComment.Missing">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="Generic.Commenting.DocComment.MissingShort">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="Generic.PHP.NoSilencedErrors.Discouraged">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="WordPress.Files.FileName.UnderscoresNotAllowed">
        <exclude-pattern>includes/schemas/*</exclude-pattern>
    </rule>
    <rule ref="WordPress.NamingConventions">
        <exclude-pattern>includes/schemas/*</exclude-pattern>
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>
    <rule ref="WordPress.WP.AlternativeFunctions">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>

    <!--
        Don't get angry about checking files that don't contain code
        @link https://github.com/stevegrunwell/wp-enforcer/issues/12
    -->
    <rule ref="Internal.NoCodeFound">
        <severity>0</severity>
    </rule>

    <rule ref="WordPress-Extra" />
    <rule ref="WordPress-Docs" />
</ruleset>