mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
Fix: change lint order to avoid file changes notice
This commit is contained in:
parent
d9f50f8433
commit
44d58295bf
20
.github/workflows/linter.yml
vendored
20
.github/workflows/linter.yml
vendored
@ -26,16 +26,6 @@ jobs:
|
|||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-go-
|
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
|
- name: Lint *.go files
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
@ -57,3 +47,13 @@ jobs:
|
|||||||
VALIDATE_JSON: false
|
VALIDATE_JSON: false
|
||||||
VALIDATE_MD: false
|
VALIDATE_MD: false
|
||||||
VALIDATE_PROTOBUF: 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
|
||||||
|
Loading…
Reference in New Issue
Block a user