fair-plugin/phpcs.xml.dist
Carrie Dils 8422d8707d
release: merge Release 1.4.0 into main for production release (#484)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: John Blackbourn <john@johnblackbourn.com>
Signed-off-by: Andy Fragen <andy@thefragens.com>
Signed-off-by: Carrie Dils <carriedils@gmail.com>
Signed-off-by: Norcross <andrew.norcross@gmail.com>
Signed-off-by: joedolson <joedolson@users.noreply.github.com>
Signed-off-by: Joe Dolson <design@joedolson.com>
Signed-off-by: Shadi Sharaf <shady@sharaf.me>
Signed-off-by: Chuck Adams <chaz@chaz.works>
Signed-off-by: Carrie Dils <cdils@users.noreply.github.com>
Signed-off-by: Mika Ipstenu Epstein <ipstenu@halfelf.org>
Signed-off-by: Ipstenu (Mika Epstein) <Ipstenu@users.noreply.github.com>
Signed-off-by: Mika <ipstenu@halfelf.org>
Signed-off-by: Mika Epstein <ipstenu@halfelf.org>
Signed-off-by: Marc Armengou <83702259+marcarmengou@users.noreply.github.com>
Signed-off-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>
Signed-off-by: Chris Reynolds <chris@jazzsequence.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: cdils <3099408+cdils@users.noreply.github.com>
Co-authored-by: Chuck Adams <chaz@chaz.works>
Co-authored-by: John Blackbourn <john@johnblackbourn.com>
Co-authored-by: Andy Fragen <andy@thefragens.com>
Co-authored-by: Norcross <andrew.norcross@gmail.com>
Co-authored-by: rmccue <21655+rmccue@users.noreply.github.com>
Co-authored-by: joedolson <joedolson@users.noreply.github.com>
Co-authored-by: Joe Dolson <design@joedolson.com>
Co-authored-by: Shady Sharaf <shady@sharaf.me>
Co-authored-by: Mika Ipstenu Epstein <ipstenu@halfelf.org>
Co-authored-by: Ipstenu (Mika Epstein) <Ipstenu@users.noreply.github.com>
Co-authored-by: Marc Armengou <83702259+marcarmengou@users.noreply.github.com>
Co-authored-by: Namith Jawahar <48271037+namithj@users.noreply.github.com>
Co-authored-by: Kaspars Dambis <hi@kaspars.net>
Co-authored-by: Chris Reynolds <chris@jazzsequence.com>
2026-05-14 11:48:55 -05:00

86 lines
3 KiB
XML

<?xml version="1.0"?>
<ruleset name="FAIR Connect coding standards">
<description>Coding standards for the FAIR Connect plugin</description>
<!-- Only scan PHP files. -->
<arg name="extensions" value="php" />
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
<arg name="cache" value=".cache/phpcs.json"/>
<!-- Path to strip from the front of file paths inside reports (displays shorter paths) -->
<arg name="basepath" value="." />
<!-- Show sniff codes in all reports. -->
<arg value="ps"/>
<!-- Set a minimum PHP version for PHPCompatibility -->
<config name="testVersion" value="7.4-" />
<!-- Set the minimum support WordPress version -->
<config name="minimum_supported_wp_version" value="5.4"/>
<!-- Set the text domain -->
<config name="text_domain" value="fair"/>
<!-- Use HM Coding Standards -->
<rule ref="vendor/humanmade/coding-standards">
<!-- Deprecated in PHPCS. Removal in 4.0.0 -->
<exclude name="Generic.Functions.CallTimePassByReference" />
<!-- Scanning CSS/JS files is deprecated in PHPCS. Removal in 4.0.0 -->
<exclude name="HM.Debug.ESLint" />
</rule>
<!-- Exclude third-party dependencies -->
<exclude-pattern>inc/updater/class-lite\.php</exclude-pattern>
<!-- Exclude language files -->
<exclude-pattern>languages/*</exclude-pattern>
<!-- Exclude sample files -->
<exclude-pattern>wp-tests-config-sample\.php</exclude-pattern>
<!-- Exclude the main plugin file from namespace file rules -->
<rule ref="HM.Files.FunctionFileName.WrongFile">
<exclude-pattern>plugin\.php</exclude-pattern>
</rule>
<!-- Cache for PHPStan and PHPCS -->
<exclude-pattern>.cache</exclude-pattern>
<exclude-pattern>tests/phpunit/cache/</exclude-pattern>
<exclude-pattern>tests/phpunit/coverage/</exclude-pattern>
<!-- Exclude the unit tests from the file name rules -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="HM.Files.ClassFileName">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>inc/icons/svg\.php</exclude-pattern>
<exclude-pattern>inc/compatibility/php-polyfill\.php</exclude-pattern>
<exclude-pattern>inc/compatibility/wp-polyfill\.php</exclude-pattern>
</rule>
<!-- Exclude the unit tests from the namespace rules -->
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<!-- Exclude some files from the side effects rules -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>plugin\.php</exclude-pattern>
<exclude-pattern>inc/icons/svg\.php</exclude-pattern>
<exclude-pattern>tests/phpunit/bootstrap\.php</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.EmbeddedPhp">
<exclude-pattern>inc/settings/namespace\.php</exclude-pattern>
</rule>
</ruleset>