Skip to content

Commit

Permalink
Merge pull request #1983 from WordPress/feature/ghactions-show-cs-vio…
Browse files Browse the repository at this point in the history
…lations-in-pr
  • Loading branch information
GaryJones authored Apr 9, 2021
2 parents 0bb2688 + d4731ef commit 2483567
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
php-version: ${{ matrix.php }}
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
coverage: none
tools: cs2pr

- name: Set PHPCS version
run: composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts
Expand All @@ -65,7 +64,7 @@ jobs:

- name: Lint PHP files against parse errors
if: ${{ matrix.phpcs_version == 'dev-master' }}
run: composer lint-ci | cs2pr
run: composer lint-ci

- name: Run unit tests
run: composer run-tests
7 changes: 6 additions & 1 deletion .github/workflows/ruleset-checks-sniffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
php-version: '7.4'
coverage: none
tools: cs2pr

# Using PHPCS `master` as an early detection system for bugs upstream.
- name: Set PHPCS version
Expand All @@ -57,7 +58,11 @@ jobs:
# @link https://github.com/WordPress/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
- name: Run PHPCS ignoring warnings
run: vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1
continue-on-error: true
run: vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 --report-full --report-checkstyle=./phpcs-report.xml

- name: Show PHPCS results in PR
run: cs2pr ./phpcs-report.xml --graceful-warnings

# Validate the XML files.
# @link http://xmlsoft.org/xmllint.html
Expand Down

0 comments on commit 2483567

Please sign in to comment.