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 556cd86 commit 421a25e
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/php-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,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 421a25e

Please sign in to comment.