From 79691240df4e05d6f6f88837c1f39a921087bbe4 Mon Sep 17 00:00:00 2001 From: Bill Fumerola Date: Fri, 19 Aug 2016 14:04:54 -0700 Subject: [PATCH] Enable lint on go1.7 --- .travis.yml | 2 +- Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e26013161..0bd5d3521 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ sudo: false go: - 1.5 - 1.6 - - 1.7rc6 + - 1.7 - tip env: global: diff --git a/Makefile b/Makefile index 666eb99f4..a4fa37d51 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PKG_FILES ?= *.go spy benchmarks zwrap zbark testutils # stable release. GO_VERSION := $(shell go version | cut -d " " -f 3) GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION))) -LINTABLE_MINOR_VERSIONS := 6 +LINTABLE_MINOR_VERSIONS := 7 ifneq ($(filter $(LINTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),) SHOULD_LINT := true endif @@ -33,6 +33,9 @@ else @echo "Not installing golint, since we don't expect to lint on" $(GO_VERSION) endif +# Disable printf-like invocation checking due to testify.assert.Error() +VET_RULES := -printf=false + .PHONY: lint lint: ifdef SHOULD_LINT @@ -42,7 +45,7 @@ ifdef SHOULD_LINT @echo "Installing test dependencies for vet..." @go test -i $(PKGS) @echo "Checking vet..." - @$(foreach dir,$(PKG_FILES),go tool vet $(dir) 2>&1 | tee -a lint.log;) + @$(foreach dir,$(PKG_FILES),go tool vet $(VET_RULES) $(dir) 2>&1 | tee -a lint.log;) @echo "Checking lint..." @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) @echo "Checking for unresolved FIXMEs..."