Skip to content

Commit

Permalink
Simplify formatter check (JuliaIO#1078)
Browse files Browse the repository at this point in the history
This will display the diff, and return a non-zero exit code if there are changes
  • Loading branch information
simonbyrne authored and mkitti committed Aug 20, 2023
1 parent cfba706 commit 095242b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/Format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,4 @@ jobs:
julia -e 'using JuliaFormatter; format(["src", "test", "deps", "filters", "gen"], verbose=true)'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
git diff --color=always --exit-code

0 comments on commit 095242b

Please sign in to comment.