File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 - name : Run golangci-lint
2727 uses : golangci/golangci-lint-action@v7
2828 with :
29- version : v2.8.0
29+ version-file : .tool-versions
Original file line number Diff line number Diff line change 1+ golangci-lint 2.8.0
Original file line number Diff line number Diff line change @@ -12,13 +12,8 @@ clean:
1212test-integration : build
1313 cd test/integration && go test -count=1 -v .
1414
15- GOLANGCI_LINT_VERSION := 2.8.0
16-
1715lint :
18- @which golangci-lint > /dev/null || (echo " golangci-lint not found." && exit 1)
19- @INSTALLED=$$(golangci-lint version --short | sed 's/^v//' ) ; \
20- if [ " $$ INSTALLED" != " $( GOLANGCI_LINT_VERSION) " ]; then \
21- echo " golangci-lint version mismatch: installed $$ INSTALLED, expected $( GOLANGCI_LINT_VERSION) " ; \
22- exit 1; \
23- fi
16+ @EXPECTED=$$(awk '/^golangci-lint/ {print $$2}' .tool-versions ) ; \
17+ INSTALLED=$$(golangci-lint version --short 2>/dev/null | sed 's/^v//' ) ; \
18+ [ " $$ INSTALLED" = " $$ EXPECTED" ] || { echo " golangci-lint $$ EXPECTED required (found: $$ INSTALLED)" ; exit 1; }
2419 golangci-lint run
You can’t perform that action at this time.
0 commit comments