Run lint on 1.12, remove pre-1.11 versions (#52)
Clean up the Makefile to use ./... instead of a packages variable.
Golint checks vendor when used with "./..." so use `go list ./...`.
This lint check was previously not even running (PKGS was undefined).
diff --git a/.travis.yml b/.travis.yml
index 9c50272..0f3769e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,16 +3,12 @@
go_import_path: go.uber.org/atomic
go:
- - 1.7.x
- - 1.8.x
- - 1.9.x
- - 1.10.x
- 1.11.x
- - 1.x # latest release
+ - 1.12.x
matrix:
include:
- - go: 1.11.x
+ - go: 1.12.x
env: NO_TEST=yes LINT=yes
cache:
diff --git a/Makefile b/Makefile
index d8945f6..1ef2630 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-PACKAGES := $(shell glide nv)
# Many Go tools take file globs or directories as arguments instead of packages.
PACKAGE_FILES ?= *.go
@@ -8,7 +7,7 @@
.PHONY: build
build:
- go build -i $(PACKAGES)
+ go build -i ./...
.PHONY: install
@@ -19,7 +18,7 @@
.PHONY: test
test:
- go test -cover -race $(PACKAGES)
+ go test -cover -race ./...
.PHONY: install_ci
@@ -39,9 +38,9 @@
@echo "Checking formatting..."
@gofmt -d -s $(PACKAGE_FILES) 2>&1 | tee lint.log
@echo "Checking vet..."
- @$(foreach dir,$(PACKAGE_FILES),go tool vet $(dir) 2>&1 | tee -a lint.log;)
+ @go vet ./... 2>&1 | tee -a lint.log;)
@echo "Checking lint..."
- @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;)
+ @golint $$(go list ./...) 2>&1 | tee -a lint.log
@echo "Checking for unresolved FIXMEs..."
@git grep -i fixme | grep -v -e vendor -e Makefile | tee -a lint.log
@[ ! -s lint.log ]