From 44d58295bf120b7795fb6a3f0490f2bb8f4b6ee8 Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 3 Sep 2020 11:33:23 +0800 Subject: [PATCH] Fix: change lint order to avoid file changes notice --- .github/workflows/linter.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 0204ecfb..0e3300a0 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -26,16 +26,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-go- - - name: Show if need to format code - if: ${{ always() }} - run: | - filesNeedToFormat=$(go fmt ./...) - if [[ $filesNeedToFormat ]]; then - echo -e "\033[0;36m[Error] The following Go files need to be formatted:\033[0m" - echo -e "\033[0;31m$filesNeedToFormat\033[0m" - exit 1 - fi - - name: Lint *.go files if: ${{ always() }} run: | @@ -57,3 +47,13 @@ jobs: VALIDATE_JSON: false VALIDATE_MD: false VALIDATE_PROTOBUF: false + + - name: Show if need to format code + if: ${{ always() }} + run: | + filesNeedToFormat=$(go fmt ./...) + if [[ $filesNeedToFormat ]]; then + echo -e "\033[0;36m[Error] The following Go files need to be formatted:\033[0m" + echo -e "\033[0;31m$filesNeedToFormat\033[0m" + exit 1 + fi