From 09316bbde9e6bde5a04dbb152b53386dd295e33f Mon Sep 17 00:00:00 2001 From: Bill Burdick Date: Tue, 18 Jun 2024 09:26:32 +0300 Subject: [PATCH 1/4] restore behavior: list files that need formatting --- action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/action.yml b/action.yml index 467cf3e..0bb886e 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,17 @@ runs: using JuliaFormatter format(".") ? exit(0) : exit(1)' shell: bash + - name: Check for formatting errors + shell: julia --color=yes --project=@juliaformatter {0} + run: | + 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 - name: 'Suggest' uses: reviewdog/action-suggester@v1 if: ${{ failure() && (inputs.suggestion-label == '' || contains( github.event.pull_request.labels.*.name, inputs.suggestion-label )) }} From 0b52e6bb2d6953a49f89c2ee4e3ee0ee34ed8875 Mon Sep 17 00:00:00 2001 From: Bill Burdick Date: Thu, 20 Jun 2024 12:21:06 +0300 Subject: [PATCH 2/4] tweaks --- action.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 0bb886e..9af3133 100644 --- a/action.yml +++ b/action.yml @@ -25,18 +25,16 @@ runs: run: | julia -e ' using JuliaFormatter - format(".") ? exit(0) : exit(1)' + format(".")' shell: bash - name: Check for formatting errors - shell: julia --color=yes --project=@juliaformatter {0} + shell: bash run: | - 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) + output=$(git diff --name-only) + if [ "$output" != "" ]; then + echo 1>&2 "Some files have not been formatted !!!" + echo "$output" + exit 1 end - name: 'Suggest' uses: reviewdog/action-suggester@v1 From c78ed01185937795deaf7c29517f34aec1c3c42f Mon Sep 17 00:00:00 2001 From: Bill Burdick Date: Fri, 21 Jun 2024 11:42:58 +0300 Subject: [PATCH 3/4] Update action.yml Co-authored-by: Morten Piibeleht --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9af3133..d7204d3 100644 --- a/action.yml +++ b/action.yml @@ -35,7 +35,7 @@ runs: echo 1>&2 "Some files have not been formatted !!!" echo "$output" exit 1 - end + fi - name: 'Suggest' uses: reviewdog/action-suggester@v1 if: ${{ failure() && (inputs.suggestion-label == '' || contains( github.event.pull_request.labels.*.name, inputs.suggestion-label )) }} From 60b257898cf9138e90358a173e8fd678ccfddf63 Mon Sep 17 00:00:00 2001 From: Bill Burdick Date: Fri, 21 Jun 2024 11:43:23 +0300 Subject: [PATCH 4/4] Update action.yml Co-authored-by: Morten Piibeleht --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d7204d3..b3a6987 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: run: | output=$(git diff --name-only) if [ "$output" != "" ]; then - echo 1>&2 "Some files have not been formatted !!!" + >&2 echo "Some files have not been formatted !!!" echo "$output" exit 1 fi