<?xml version="1.0"?>
<ruleset name="Perfection42 Plugin Coding Standards">
    <description>Project-specific PHPCS configuration for WordPress Coding Standards.</description>

    <!-- Base standard -->
    <rule ref="WordPress"/>

    <!-- Scan only PHP files by default -->
    <arg name="extensions" value="php"/>

    <!-- Exclude third-party and non-PHP asset paths -->
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/node_modules/*</exclude-pattern>
    <exclude-pattern>*/webapp/*</exclude-pattern>
    <exclude-pattern>*/assets/*</exclude-pattern>

    <!-- Allow PSR-4 file naming in src by excluding WP file-name sniffs there -->
    <rule ref="WordPress.Files.FileName">
        <exclude-pattern>src/*</exclude-pattern>
    </rule>

    <!-- Optionally reduce noise from minified build artefacts anywhere -->
    <exclude-pattern>*/dist/*</exclude-pattern>
    <exclude-pattern>*/build/*</exclude-pattern>
    <exclude-pattern>*/tools/*</exclude-pattern>

    <!-- Set minimum supported WP version for deprecation checks (optional) -->
    <config name="minimum_wp_version" value="6.5"/>
</ruleset>
