Merge pull request #765 from rade/run_linter_on_travis
Run linter on travis
This commit is contained in:
commit
a27516b0bf
3 files changed
+3
-2
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
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC
|
|||||||
|
|
||||||
all: $(WEAVER_EXPORT) $(WEAVEDNS_EXPORT) $(WEAVEEXEC_EXPORT)
|
all: $(WEAVER_EXPORT) $(WEAVEDNS_EXPORT) $(WEAVEEXEC_EXPORT)
|
||||||
|
|
||||||
travis: $(WEAVER_EXE) $(WEAVEDNS_EXE)
|
travis: $(WEAVER_EXE) $(WEAVEDNS_EXE) $(SIGPROXY_EXE) $(WEAVEPROXY_EXE) $(WEAVEWAIT_EXE)
|
||||||
|
|
||||||
update:
|
update:
|
||||||
go get -u -f -v -tags -netgo ./$(dir $(WEAVER_EXE)) ./$(dir $(WEAVEDNS_EXE)) ./$(dir $(SIGPROXY_EXE)) ./$(dir $(WEAVEPROXY_EXE))
|
go get -u -f -v -tags -netgo ./$(dir $(WEAVER_EXE)) ./$(dir $(WEAVEDNS_EXE)) ./$(dir $(SIGPROXY_EXE)) ./$(dir $(WEAVEPROXY_EXE))
|
||||||
|
|||||||
@@ -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