File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - name : Run PHPCS (changed lines only)
2323 run : |
2424 if [ "${{ github.event_name }}" = "pull_request" ]; then
25- vendor/bin/phpcs-changed --git --git-base "${{ github.event.pull_request.base.sha }}"
25+ BASE= "${{ github.event.pull_request.base.sha }}"
2626 else
27- vendor/bin/phpcs-changed --git --git-base "${{ github.event.before }}"
27+ BASE= "${{ github.event.before }}"
2828 fi
29+ FILES=$(git diff --name-only --diff-filter=d "$BASE" HEAD -- '*.php')
30+ if [ -z "$FILES" ]; then
31+ echo "No PHP files changed, skipping PHPCS."
32+ exit 0
33+ fi
34+ echo "Changed PHP files:"
35+ echo "$FILES"
36+ echo "$FILES" | xargs vendor/bin/phpcs-changed --git --git-base "$BASE"
Original file line number Diff line number Diff line change 1212 displayDetailsOnTestsThatTriggerNotices=" true"
1313 displayDetailsOnTestsThatTriggerWarnings=" true"
1414 failOnDeprecation=" true"
15- failOnEmptyTestSuite=" true"
1615 failOnPhpunitDeprecation=" true"
1716 failOnNotice=" true"
1817 failOnRisky=" true"
Original file line number Diff line number Diff line change 1212 displayDetailsOnTestsThatTriggerNotices=" true"
1313 displayDetailsOnTestsThatTriggerWarnings=" true"
1414 failOnDeprecation=" true"
15- failOnEmptyTestSuite=" true"
1615 failOnPhpunitDeprecation=" true"
1716 failOnNotice=" true"
1817 failOnRisky=" true"
You can’t perform that action at this time.
0 commit comments