<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
  <description>Chisel Ruleset</description>

  <file>.</file>

  <!-- Exclude paths -->
  <exclude-pattern>*/assets/hashes.php</exclude-pattern>
  <exclude-pattern>*/acf-json/*</exclude-pattern>
  <exclude-pattern>*/dist/*</exclude-pattern>
  <exclude-pattern>*/build/*</exclude-pattern>
  <exclude-pattern>*/vendor/*</exclude-pattern>
  <exclude-pattern>*/views/*</exclude-pattern>
  <exclude-pattern>*/node_modules/*</exclude-pattern>

  <!-- Show progress, show the error codes for each message (source). -->
  <arg value="ps" />

  <!-- Check up to 8 files simultaneously. -->
  <arg name="parallel" value="8" />

  <!-- Include the WordPress-Core standard. -->
  <rule ref="WordPress-Core">
    <!-- <exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/> -->
    <exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
  </rule>

  <rule ref="WordPress.DB.DirectDatabaseQuery">
      <severity>0</severity>
  </rule>

  <rule ref="WordPress">
    <!-- <exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/> -->
    <exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>

    <!-- Intentionally different names. -->
    <!-- <exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
    <exclude name="PEAR.NamingConventions.ValidClassName.StartWithCapital"/> -->
    <exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
    <exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>

    <!-- We're not strict about this. -->
    <!-- <exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/> -->

    <!-- We don't want Yoda conditions.. -->
    <exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
    <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
  </rule>

  <rule ref="WordPress-Docs">
    <exclude name="Squiz.Commenting.FileComment.Missing" />
    <exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
    <!-- <exclude name="Squiz.Commenting.ClassComment.Missing" />
    <exclude name="Squiz.Commenting.FunctionComment.Missing" />
    <exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" /> -->
  </rule>

  <rule ref="Internal.NoCodeFound">
    <severity>0</severity>
  </rule>

  <rule ref="Universal.Operators.DisallowShortTernary">
    <severity>0</severity>
  </rule>

</ruleset>
