Introduces GitHub Actions workflows for continuous integration and deployment. CI runs PHP linting (7.4, 8.1, 8.3), PHPCS with WordPress coding standards, PHPUnit tests across PHP versions, and JS syntax checks. Deployment to Hostinger via FTPS triggers on push to main after all CI checks pass, with optional LiteSpeed cache purge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
1.7 KiB
XML
51 lines
1.7 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="Peptide News Plugin">
|
|
<description>PHPCS rules for the Peptide News WordPress plugin.</description>
|
|
|
|
<!-- Scan these directories -->
|
|
<file>./peptide-news-plugin.php</file>
|
|
<file>./includes</file>
|
|
<file>./admin</file>
|
|
<file>./public</file>
|
|
|
|
<!-- Exclude generated / third-party -->
|
|
<exclude-pattern>./vendor/*</exclude-pattern>
|
|
<exclude-pattern>./node_modules/*</exclude-pattern>
|
|
<exclude-pattern>./tests/*</exclude-pattern>
|
|
<exclude-pattern>./peptide-news-plugin/*</exclude-pattern>
|
|
|
|
<!-- Show progress and use colours -->
|
|
<arg value="sp"/>
|
|
<arg name="colors"/>
|
|
<arg name="extensions" value="php"/>
|
|
<arg name="parallel" value="8"/>
|
|
|
|
<!-- WordPress Coding Standards — relaxed for a small plugin -->
|
|
<rule ref="WordPress-Core">
|
|
<!-- Allow short array syntax -->
|
|
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
|
|
<!-- File-naming flexibility for class files already committed -->
|
|
<exclude name="WordPress.Files.FileName"/>
|
|
</rule>
|
|
|
|
<rule ref="WordPress-Extra">
|
|
<!-- Don't require Yoda conditions for readability -->
|
|
<exclude name="WordPress.PHP.YodaConditions"/>
|
|
</rule>
|
|
|
|
<!-- PHP Compatibility — target PHP 7.4+ -->
|
|
<config name="testVersion" value="7.4-"/>
|
|
<rule ref="PHPCompatibilityWP"/>
|
|
|
|
<!-- Allow long lines in SQL queries up to 200 chars -->
|
|
<rule ref="Generic.Files.LineLength">
|
|
<properties>
|
|
<property name="lineLimit" value="200"/>
|
|
<property name="absoluteLineLimit" value="0"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Minimum WP version supported -->
|
|
<config name="minimum_wp_version" value="5.8"/>
|
|
</ruleset>
|