Skip to content

Commit db951c7

Browse files
committed
fix: Treat PHPCS warnings as non-blocking in quality workflow
PHPCS exit code 1 means warnings-only (no errors). Previously this failed the job. Now only exit code 2 (actual errors) fails the check.
1 parent 951113f commit db951c7

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/quality.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,15 @@ jobs:
161161
- name: Install dependencies
162162
run: composer install --no-progress --prefer-dist --optimize-autoloader
163163
- name: Run PHPCS
164-
run: composer phpcs
164+
run: |
165+
# Exit code 0 = clean, 1 = warnings only, 2 = errors found.
166+
# We treat warnings as non-blocking (exit 1 → success).
167+
composer phpcs; RC=$?
168+
if [ "$RC" -eq 1 ]; then
169+
echo "::warning::PHPCS found warnings but no errors — passing."
170+
exit 0
171+
fi
172+
exit $RC
165173
166174
lint-phpmd:
167175
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)