mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2026-06-07 09:03:30 +00:00
[ci] Update linting tools installation method
This commit is contained in:
@@ -12,15 +12,17 @@ integration-test:
|
|||||||
go test -count=1 -v ./integration-tests
|
go test -count=1 -v ./integration-tests
|
||||||
|
|
||||||
install-tools:
|
install-tools:
|
||||||
@command golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@if ! command -v golangci-lint &> /dev/null; then \
|
||||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin; \
|
echo "Installing golangci-lint"; \
|
||||||
|
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(GOPATH)/bin; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@command $(GOPATH)/revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@if ! command -v revive &> /dev/null; then \
|
||||||
go get -u github.com/mgechev/revive; \
|
echo "Installing revive..."; \
|
||||||
fi
|
go install github.com/mgechev/revive@latest; \
|
||||||
|
fi
|
||||||
|
|
||||||
@command $(GOPATH)/shadow > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@if ! command -v shadow &> /dev/null; then \
|
||||||
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest; \
|
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user