airbnb / gosal

A Sal client written in Go
Apache License 2.0
35 stars 21 forks source link

make lint should error #31

Closed clburlison closed 6 years ago

clburlison commented 6 years ago

Right now if make lint finds errors it will happily print to stdout and give an exit code of 0.

$ make lint
All .go files formatted correctly
go vet ./...
for pkg in $(go list ./... |grep -v /vendor/); do golint $pkg; done
/Users/clayton.burlison/src/go/src/github.com/airbnb/gosal/cmd/gosal/gosal.go:45:22: error strings should not be capitalized or end with punctuation or a newline
/Users/clayton.burlison/src/go/src/github.com/airbnb/gosal/config/config.go:9:1: comment on exported function New should be of the form "New ..."
/Users/clayton.burlison/src/go/src/github.com/airbnb/gosal/version/version.go:25:1: package comment should not have leading space
$ echo $status
0

Instead it should error. The only problem is ideally we would like for the for loop to finish and then check stdout for issues. That would give all lint issues in one CI pass. In the few minutes I looked I didn't find a quick solution to handle this.

groob commented 6 years ago

https://github.com/golang/lint/commit/58f662d2fc0598c6c36a92ae29af1caa6ec89d7a