Run optional jshint tests if it's installed

This commit is contained in:
Łukasz Mierzwa
2017-04-25 19:42:23 -07:00
parent 9152aeff04
commit 9f7a7dd899
2 changed files with 7 additions and 1 deletions

View File

@@ -19,6 +19,9 @@ ifdef DEBUG
DOCKER_ARGS = -v $(CURDIR)/assets:$(CURDIR)/assets:ro
endif
# detect if jshint is installed
JSHINT := $(shell which jshint)
.DEFAULT_GOAL := $(NAME)
.build/deps.ok:
@@ -75,6 +78,9 @@ run-docker: docker-image
.PHONY: lint
lint: .build/deps.ok
@golint ./... | (egrep -v "^vendor/|^bindata_assetfs.go" || true)
ifneq ($(JSHINT),)
@$(JSHINT) assets/static/*.js
endif
.PHONY: test
test: lint bindata_assetfs.go

File diff suppressed because one or more lines are too long