Skip to content

Commit

Permalink
chore: Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hectoras committed Dec 11, 2023
1 parent 2f00180 commit bbaab1e
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/php-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ jobs:
uses: tj-actions/changed-files@v40
id: changed-files
with:
since_last_remote_commit: true
since_last_remote_commit: false

- name: Setup PHP environment
uses: shivammathur/setup-php@v2
with:
coverage: none
tools: phpmd



- name: Run PHP Mess Detector on modified files
shell: bash
run: |
Expand All @@ -34,25 +32,4 @@ jobs:
done
FILELIST=$(mktemp /tmp/phpmd-check.XXXXXX)
mapfile -d ',' -t all_files < <(printf '%s,' '${{ steps.changed-files.outputs.all_changed_files }}')
for FILE in ${{ all_files[@] }}; do
EXT="${FILE##*.}"
echo "Changed file: " $FILE ", extension: " $EXT
if [[ "$EXT" == "php" ]]; then
echo "${FILE}" >> "${FILELIST}"
echo "File added to the file list: " $FILE
fi
done
if [ -s "${all_files[@]}" ]; then
FILES=`echo ${{ steps.files.outputs.all }} | paste -sd "," -`
echo "Running PHPMD on" $FILES
phpmd $FILES github .github/phpmd-ruleset.xml --exclude 'vendor/*'
RETVAL=$?
echo "The following files were tested for PSR-12 errors:"; echo
cat -n "$FILELIST"
else
echo "There are no changes in PHP files (no PHP-MD test performed)"
fi
rm "$FILELIST"
exit $RETVAL

0 comments on commit bbaab1e

Please sign in to comment.