From 095242b41d8bf88b99610674c9962668494392d3 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Sun, 4 Jun 2023 16:16:51 -0700 Subject: [PATCH] Simplify formatter check (#1078) This will display the diff, and return a non-zero exit code if there are changes --- .github/workflows/Format-check.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/Format-check.yml b/.github/workflows/Format-check.yml index c78049d32..84ee7f225 100644 --- a/.github/workflows/Format-check.yml +++ b/.github/workflows/Format-check.yml @@ -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