language: go

go:
  - 1.7
  - 1.8
  - tip

matrix:
  allow_failures:
    - go: tip
  # don't wait for tip tests to finish, since they're allowed to fail
  fast_finish: true

notifications:
  email: false

before_script:
  - GO_FILES=$(find . -iname '*.go' | grep -v /vendor/)
  - PKGS=$(go list ./... | grep -v /vendor/)
  - go get github.com/golang/lint/golint
  - go get honnef.co/go/tools/cmd/{gosimple,staticcheck,unused}

script:
  - test -z $(gofmt -s -l $GO_FILES)
  - go test -v -race $PKGS
  - go vet $PKGS
  - staticcheck $PKGS
  - gosimple $PKGS
  - unused $PKGS
  - golint -set_exit_status $PKGS

language: go

go:
  - 1.7
  - 1.8
  - tip

matrix:
  allow_failures:
    - go: tip
  # don't wait for tip tests to finish, since they're allowed to fail
  fast_finish: true

notifications:
  email: false

before_script:
  - GO_FILES=$(find . -iname '*.go' | grep -v /vendor/)
  - PKGS=$(go list ./... | grep -v /vendor/)
  - go get github.com/golang/lint/golint
  - go get honnef.co/go/tools/cmd/megacheck

script:
  - test -z $(gofmt -s -l $GO_FILES)
  - go test -v -race $PKGS
  - go vet $PKGS
  - megacheck $PKGS
  - golint -set_exit_status $PKGS

Replace staticcheck, gosimple, unused with megacheck
Replace staticcheck, gosimple, unused with megacheck

megacheck combines staticcheck, gosimple, and unused. It's significantly
faster than running all three separately because it reuses some of the
work.
