From b85ddc4e4fccb5c4a00f9c370c26e6cba044c5aa Mon Sep 17 00:00:00 2001 From: klauspost Date: Tue, 3 Nov 2015 13:50:29 +0100 Subject: [PATCH] Extend CI tests to include formatting checks. CI tests now tests 'go vet', 'go fmt' (via goimports) and golint. Adds Travis experimental OSX support. --- .travis.yml | 14 +++++++++++++- fs/config.go | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20b58cc42..52bf47442 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,24 @@ language: go sudo: false +os: + - linux + - osx + go: - 1.3.3 - 1.4.2 - 1.5 + - tip + +install: + - go get ./... + - go get -u github.com/golang/lint/golint + - go get -u golang.org/x/tools/cmd/goimports script: - - go get ./... + - go vet ./... + - diff <(goimports -d .) <(printf "") + - diff <(golint ./...) <(printf "") - go test -v ./... - go test -cpu=2 -race -v ./... diff --git a/fs/config.go b/fs/config.go index 36b87bf2c..171f7e64b 100644 --- a/fs/config.go +++ b/fs/config.go @@ -18,6 +18,7 @@ import ( "time" "crypto/tls" + "github.com/Unknwon/goconfig" "github.com/mreiferson/go-httpclient" "github.com/spf13/pflag"