From 32c0bff1a887caf206ddd5ea1a8ae9df8dd166f4 Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Sat, 25 Apr 2020 14:14:59 -0700 Subject: Makefile: pin golangci-lint version Used the recipe from https://github.com/golangci/golangci-lint --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1f5c3dde3..d8831f9db 100644 --- a/Makefile +++ b/Makefile @@ -339,8 +339,14 @@ install_prerequisites: sudo apt-get install -y -q g++-mips64el-linux-gnuabi64 || true sudo apt-get install -y -q ragel clang-format go get -u golang.org/x/tools/cmd/goyacc \ - github.com/golangci/golangci-lint/cmd/golangci-lint \ github.com/dvyukov/go-fuzz/go-fuzz-build + # Runs golangci-lint when go is new enough. Old versions get a + # free pass (except on CI which has newer go version). + if [ "$$(go version)" \> "go version go1.12" ]; then \ + GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.25.0 ; \ + else \ + ln -sf /bin/true $$(go env GOPATH)/bin/golangci-lint ; \ + fi check_copyright: ./tools/check-copyright.sh -- cgit mrf-deployment