We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 297f412 commit 9e4cc2bCopy full SHA for 9e4cc2b
1 file changed
.github/workflows/go-lint.yml
@@ -25,9 +25,17 @@ jobs:
25
if: hashFiles('./.github/actions/go-lint-setup') != ''
26
- name: Check module tidiness
27
run: |
28
+ had_sum=$( [ -f go.sum ] && echo true || echo false )
29
go mod tidy
30
git diff --exit-code go.mod
- git diff --exit-code go.sum
31
+ if [ -f go.sum ]; then
32
+ if [ "$had_sum" = true ]; then
33
+ git diff --exit-code go.sum
34
+ else
35
+ echo "error: go.sum was created by 'go mod tidy' but is not checked in"
36
+ exit 1
37
+ fi
38
39
- name: Vet Go files
40
if: always()
41
run: go vet ./...
0 commit comments