Skip to content

Commit

Permalink
Add static check to travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
kisom committed Dec 14, 2016
1 parent efa6c57 commit 9bd4411
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ before_script:
- go get -u github.com/golang/lint/golint
- go get github.com/modocache/gover
- go get -v github.com/GeertJohan/fgt
- go get honnef.co/go/staticcheck/cmd/staticcheck
# Setup DBs + run migrations
- go get bitbucket.org/liamstask/goose/cmd/goose
- if [[ $(uname -s) == 'Linux' ]]; then
Expand Down
13 changes: 11 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ else
fi

go vet $PACKAGES
if ! which fgt > /dev/null ; then
if ! command -v fgt > /dev/null ; then
go get github.com/GeertJohan/fgt
fi

if ! which golint > /dev/null ; then
if ! command -v golint > /dev/null ; then
go get github.com/golang/lint/golint
fi

Expand All @@ -52,6 +52,15 @@ do
fgt golint "${package}"
done

if ! command -v staticcheck > /dev/null ; then
go get github.com/dominikh/go-staticcheck/cmd/staticcheck
fi

for package in $PACKAGES
do
fgt staticcheck "${package}"
done

# check go fmt
for package in $PACKAGES
do
Expand Down

0 comments on commit 9bd4411

Please sign in to comment.