fix(ci): treat phpcs exit 2 (warnings-only) as success

PHPCS exits 2 when there are warnings but no errors. The ruleset already
downgrades known pre-existing patterns to <type>warning</type>. CI should
fail only on exit 1 (actual errors).

ignore_warnings_on_exit is not a valid PHPCS config property — previous
attempt had no effect. Using explicit exit code check instead:
  vendor/bin/phpcs ... || test $? -eq 2
This commit is contained in:
peptiderepo
2026-04-24 06:21:00 +00:00
parent 6988a1fe7b
commit 45a0928664

View File

@@ -87,7 +87,5 @@
<!-- Minimum WP version supported -->
<config name="minimum_wp_version" value="5.8"/>
<!-- Warnings are informational — do not fail CI on warnings-only runs -->
<config name="ignore_warnings_on_exit" value="1"/>
</ruleset>