<?xml version="1.0"?>
<ruleset>
    <!-- Scan only PHP files -->
    <arg name="extensions" value="php"/>

    <!-- Show colors in console -->
    <arg value="-colors"/>

    <!-- Show progress -->
    <arg value="p"/>

    <!-- Use HM Coding Standards -->
    <rule ref="vendor/humanmade/coding-standards">
        <!-- Disable all ESLint checks -->
        <exclude name="HM.Debug.ESLint"/>
        <!-- Disable rules we disagree with -->
        <exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
        <exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase"/>
        <exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
        <exclude name="WordPress.VIP.SessionVariableUsage"/>
        <exclude name="WordPress.VIP.SessionFunctionsUsage"/>
        <!-- Disable LayoutOrder until humanmade/coding-standards#5 is fixed -->
        <exclude name="HM.Layout.Order.WrongOrder"/>
    </rule>

    <!-- Re-enable rules we agree with -->
    <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>

    <!-- Disable Side Effects rule for bootstrapping file, extends WordPress core, cron scripts -->
    <rule ref="PSR1.Files.SideEffects">
        <exclude-pattern>/bin/*</exclude-pattern>
    </rule>

    <!-- Disable Namespaced Functions for cron scripts -->
    <rule ref="HM.Functions.NamespacedFunctions">
        <exclude-pattern>/bin/*</exclude-pattern>
    </rule>

    <exclude-pattern>/vendor/*</exclude-pattern>

</ruleset>