Skip to content

Commit

Permalink
Make the github action linter step fail in the case of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Feb 15, 2024
1 parent 3d78224 commit a41f0e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ jobs:
- name: Run linters
run: |
npm run format
- name: Check if anything changed
run: |
git_status="`LC_ALL=C git status --porcelain --ignore-submodules -unormal 2>&1`"
if [ -n "$git_status" ]; then
printf "Some file(s) changed as the result of formatting, this means that you need to run the formatter on your patch.\n"
printf "Here is what changed:\n"
printf -- "$git_status\n\n"
printf "And here is the diff:\n"
git diff -U8
exit 1
fi
build:
name: Build
runs-on: macos-latest
Expand Down

0 comments on commit a41f0e0

Please sign in to comment.