Skip to content

Commit

Permalink
re-introducing non silent fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dpanta94 committed Jun 18, 2024
1 parent de0dee7 commit fb63a6c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,10 @@ jobs:
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.access-token }}
run: |
vendor/bin/phpcs --report=json ${CHANGED_FILES} | jq -r ' .files | to_entries[] | .key as $path | .value.messages[] as $msg | "\($path):\($msg.line):\($msg.column):`\($msg.source)`<br>\($msg.message)" ' | reviewdog -efm="%f:%l:%c:%m" -name="phpcs" -filter-mode="added" -fail-on-error=true -reporter=github-pr-review
JSON_REPORT=$(vendor/bin/phpcs --report=json ${{ env.CHANGED_FILES }} )
echo $JSON_REPORT | jq empty
if [ $? -ne 0 ]; then
echo "Invalid JSON"
exit 1
fi
echo $JSON_REPORT | jq -r ' .files | to_entries[] | .key as $path | .value.messages[] as $msg | "\($path):\($msg.line):\($msg.column):`\($msg.source)`<br>\($msg.message)" ' | reviewdog -efm="%f:%l:%c:%m" -name="phpcs" -filter-mode="added" -fail-on-error=true -reporter=github-pr-review

0 comments on commit fb63a6c

Please sign in to comment.