run linter on travis
This commit is contained in:
1 parent
d68dd39839
commit
4dc2ee034c
2 files changed
+2
-1
No files matched your search
@@ -14,6 +14,7 @@ addons:
|
|||||||
install:
|
install:
|
||||||
- go clean -i net
|
- go clean -i net
|
||||||
- go install -tags netgo std
|
- go install -tags netgo std
|
||||||
|
- go get github.com/golang/lint/golint
|
||||||
- pip install --user --upgrade gcloud gsutil
|
- pip install --user --upgrade gcloud gsutil
|
||||||
- bin/setup-ci-secrets $encrypted_5ba036e89377_key $encrypted_5ba036e89377_iv
|
- bin/setup-ci-secrets $encrypted_5ba036e89377_key $encrypted_5ba036e89377_iv
|
||||||
- make travis
|
- make travis
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function lint_go {
|
|||||||
# don't have it installed.
|
# don't have it installed.
|
||||||
if type golint >/dev/null 2>&1; then
|
if type golint >/dev/null 2>&1; then
|
||||||
# golint doesn't set an exit code it seems
|
# golint doesn't set an exit code it seems
|
||||||
lintoutput=$(golint "${filename}")
|
lintoutput=$(golint "${filename}" | grep -vE 'comment|dot imports')
|
||||||
if [ "$lintoutput" != "" ]; then
|
if [ "$lintoutput" != "" ]; then
|
||||||
result=1
|
result=1
|
||||||
echo "$lintoutput"
|
echo "$lintoutput"
|
||||||
|
|||||||
Reference in new issue
Block a user