<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="drupal">
    <description>PHP CodeSniffer configuration for Drupal coding standards in Open Social.</description>
    <file>./html/profiles/contrib/social/modules/custom</file>
    <file>./html/profiles/contrib/social/modules/social_features</file>
    <file>./html/profiles/contrib/social/social.profile</file>
    <file>./html/profiles/contrib/social/social.install</file>
    <config name="ignore_errors_on_exit" value="0"/>
    <config name="ignore_warnings_on_exit" value="0"/>
    <config name="default_standard" value="Drupal"/>

    <arg name="extensions" value="php,module,inc,install,test,profile,theme" />

    <exclude-pattern>*/node_modules/*</exclude-pattern>
    <exclude-pattern>*.css</exclude-pattern>
    <exclude-pattern>*/assets/*</exclude-pattern>
    <exclude-pattern>*/components/*</exclude-pattern>
    <exclude-pattern>social.info.yml</exclude-pattern>
    <exclude-pattern>*.md</exclude-pattern>
    <exclude-pattern>PULL_REQUEST_TEMPLATE\.md</exclude-pattern>

    <config name="drupal_core_version" value="9" />
    <!--  Include all Drupal related rules but exclude some so we can gradually fix these. -->
    <rule ref="Drupal">
        <exclude name="Drupal.Commenting.ClassComment.Short"/>
        <exclude name="Drupal.Commenting.Deprecated.IncorrectTextLayout"/>
        <exclude name="Drupal.Commenting.Deprecated.DeprecatedPeriodAfterSeeUrl"/>
        <exclude name="Drupal.Commenting.Deprecated.DeprecatedWrongSeeUrlFormat"/>
        <exclude name="Drupal.Arrays.Array.LongLineDeclaration"/>
        <!-- This was introduced in 8.3.16 and we have some _private functions that don't adhere to it -->
        <exclude name="Drupal.NamingConventions.ValidFunctionName.InvalidPrefix" />
        <!-- We have some big refactors in flight for which fixing all the use-statements is prohibitively disruptive.
        We push this backwards -->
        <exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses" />
    </rule>

</ruleset>
