Catch all the PHPCS errors only on changed files (https://github.com/woocommerce/woocommerce-blocks/pull/10402)
* Commit a php lint warning * Add param to show php warnings * Print exit code * Test * test 2 * Add back cs2pr * Add checkstyle * Remove exit code * Test without report * Add checkstyle * Fix php * Test changed files * Print changed files * Introduce error * More errors * Fix errors * Test * Test all cases * Fix php lint errors * Rename readme * Show all files * Test new action * Test * Try other actions * Add errors * Remove actions * More errors * Fix git diff * Fix all php errors * Remove git fetch * Add error * Fix error and action
This commit is contained in:
parent
720f65ca36
commit
2df75990e3
|
@ -60,5 +60,8 @@ jobs:
|
|||
- name: Log PHPCS debug information
|
||||
run: phpcs -i
|
||||
|
||||
- name: Run PHPCS on all files
|
||||
run: phpcs ./src -n --report=checkstyle | cs2pr
|
||||
- name: Run PHPCS on all changed files
|
||||
run: |
|
||||
git fetch origin trunk
|
||||
changes=$(git diff --name-only origin/trunk..HEAD | tr '\n' ' ')
|
||||
phpcs ${changes} -q --report=checkstyle | cs2pr
|
||||
|
|
Loading…
Reference in New Issue