-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
When I forget to run PHPCBF before making a pull request, errors that can be fixed automatically are flagged by PHPCS for manual review.
Describe the solution you'd like
In the code-quality.yml
GitHub Action, PHPCBF should be run before PHPCS:
- name: Run PHPCBF to fix what it can
continue-on-error: true
run: vendor/bin/phpcbf
- name: Run PHPCS and add annotations to the code
run: vendor/bin/phpcs -q -n --report=checkstyle | cs2pr
At some point the PHPCBF changes need to be committed. This could be immediately after PHPCBF is run but would mean contributors need to pull changes before they can push again, (I see a note in my own yml: "NB: Pull requests from forks do not have access to repository secrets so cannot commit changes.") so maybe on every commit to master PHPCBF plus a commit should be run:
on:
push:
branches:
- master
...
- name: Commit PHPCBF changes
uses: stefanzweifel/[email protected]
with:
commit_message: "🤖 PHPCBF"