From 3aa2b3a755f4788a883b8a9e3df0dce9f3c262cd Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 8 Dec 2022 16:51:44 +0100 Subject: [PATCH] Add staticheck to make lint (#4395) --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 82fe7210..253855ad 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ getdeps: @mkdir -p ${GOPATH}/bin @echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.46.2 @echo "Installing stringer" && go install -v golang.org/x/tools/cmd/stringer@latest + @echo "Installing staticheck" && go install honnef.co/go/tools/cmd/staticcheck@latest crosscompile: @(env bash $(PWD)/buildscripts/cross-compile.sh) @@ -34,6 +35,7 @@ vet: lint: @echo "Running $@ check" @GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml + @GO111MODULE=on ${GOPATH}/bin/staticcheck -tests=false -checks="all,-ST1000,-ST1003,-ST1016,-ST1020,-ST1021,-ST1022,-ST1023,-ST1005" ./... # Builds mc, runs the verifiers then runs the tests. check: test