Skip to content

Commit

Permalink
Enable lint on go1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
billf committed Aug 19, 2016
1 parent d11d285 commit 73af7cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: false
go:
- 1.5
- 1.6
- 1.7rc6
- 1.7
- tip
env:
global:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +33,8 @@ else
@echo "Not installing golint, since we don't expect to lint on" $(GO_VERSION)
endif

VET_SKIP_ERRORF=grep -v -e "possible formatting directive in Error call"

.PHONY: lint
lint:
ifdef SHOULD_LINT
Expand All @@ -42,7 +44,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 $(dir) 2>&1 | $(VET_SKIP_ERRORF) | tee -a lint.log;)
@echo "Checking lint..."
@$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;)
@echo "Checking for unresolved FIXMEs..."
Expand Down

0 comments on commit 73af7cb

Please sign in to comment.