forked from PaulMaddox/drac-kvm
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
24 lines (20 loc) · 928 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: go
go:
- 1.11
- 1.10
- master
# Don't email me the results of the test runs.
notifications:
email: false
before_script:
- go get github.com/golang/lint/golint # Linter
- go get honnef.co/go/tools/cmd/megacheck # Badass static analyzer/linter
- go get github.com/fzipp/gocyclo
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
# script always run to completion (set +e). All of these code checks are must haves
# in a modern Go project.
script:
- test -z $(echo ${GO_FILES} | xargs gofmt -s -l) # Fail if a .go file hasn't been formatted with gofmt
- go vet $(go list ./...) # go vet is the official Go static analyzer
- megacheck $(go list ./...) # "go vet on steroids" + linter
- golint -set_exit_status $(go list ./...) # one last linter