Skip to content

Commit fc51459

Browse files
committed
GH Actions: report CS violations in the PR
The cs2pr tool will allow to display the results from an action run in checkstyle format in-line in the PR code view, which should improve usability of the workflow results. Ref: https://github.com/staabm/annotate-pull-request-from-checkstyle
1 parent f7d0570 commit fc51459

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/check-cs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ jobs:
2727
with:
2828
php-version: 7.4
2929
coverage: none
30-
tools: composer
30+
tools: composer, cs2pr
3131

3232
- name: Install dependencies
3333
run: |
3434
composer update --prefer-dist --no-suggest --no-progress
3535
3636
- name: Check Code Style
37-
run: vendor/bin/phpcs
37+
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
38+
39+
- name: Show PHPCS results in PR
40+
run: cs2pr ./phpcs-report.xml

0 commit comments

Comments
 (0)