Run lint on specs

This commit is contained in:
Tom Payne
2012-09-27 12:33:23 +02:00
parent b7def4c8c4
commit 5ddbf17c8d
2 changed files with 10 additions and 4 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,6 @@
/bin/plovr*.jar
/build/lint-timestamp
/build/lint-spec-timestamp
/build/lint-src-timestamp
/build/ol.js
/build/ol-all.js
/build/proj4js-combined.js

View File

@@ -1,6 +1,7 @@
JSDOC = jsdoc
PHANTOMJS = phantomjs
PLOVR_JAR = bin/plovr-b254c26318c5.jar
SPEC = $(shell find test/spec -name \*.js)
SRC = $(shell find exports externs src/ol -name \*.js)
TARGETS = $(shell find demos -name advanced-optimizations.js)
comma := ,
@@ -104,11 +105,14 @@ serve: $(PLOVR_JAR) build/require-all.js
java -jar $(PLOVR_JAR) serve build/*.json demos/*/*.json
.PHONY: lint
lint: build/lint-timestamp
lint: build/lint-src-timestamp build/lint-spec-timestamp
build/lint-timestamp: $(SRC)
build/lint-src-timestamp: $(SRC)
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(filter-out $(TARGETS),$(shell find demos -name \*.js)) && touch $@
build/lint-spec-timestamp: $(SPEC)
gjslint $(SPEC) && touch $@
.PHONY: plovr
plovr: $(PLOVR_JAR)
@@ -125,7 +129,8 @@ test:
$(PHANTOMJS) test/phantom-jasmine/run_jasmine_test.coffee test/ol.html
clean:
rm -f build/lint-timestamp
rm -f build/lint-spec-timestamp
rm -f build/lint-src-timestamp
rm -f build/ol.js
rm -f build/ol-all.js
rm -f build/require-all.js