Skip to content

Commit

Permalink
Fix: change lint order to avoid file changes notice
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier committed Sep 3, 2020
1 parent d9f50f8 commit 44d5829
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

0 comments on commit 44d5829

Please sign in to comment.