summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-11-08 09:24:51 +0100
committerMartin Babinsky <mbabinsk@redhat.com>2016-11-09 13:08:32 +0100
commitf31a489d246e01250536b7187225fb7ca6398ba5 (patch)
tree90459feb40a97a94122cf294735c6066f781e5cc /Makefile.am
parent14c1c8dfd0aa894af2d60dfa4f2ce2510d791328 (diff)
downloadfreeipa-f31a489d246e01250536b7187225fb7ca6398ba5.tar.gz
freeipa-f31a489d246e01250536b7187225fb7ca6398ba5.tar.xz
freeipa-f31a489d246e01250536b7187225fb7ca6398ba5.zip
Build: add JS lint target
https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am26
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 90b1c1ee9..803b0a92a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,7 +49,10 @@ rpms: dist-gzip rpmroot rpmdistdir
if WITH_PYLINT
PYLINT_TARGET = pylint
endif WITH_PYLINT
-lint: $(PYLINT_TARGET)
+if WITH_JSLINT
+JSLINT_TARGET = jslint
+endif WITH_JSLINT
+lint: $(PYLINT_TARGET) $(JSLINT_TARGET)
.PHONY: pylint
pylint:
@@ -66,3 +69,24 @@ pylint:
echo "Pylint is running, please wait ..."; \
PYTHONPATH=$(top_srcdir) $(PYLINT) \
--rcfile=$(top_srcdir)/pylintrc $${FILES}
+
+.PHONY: jslint jslint-ui jslint-ui-test jslint-html
+jslint: jslint-ui jslint-ui-test jslint-html
+
+# create temporary symlinks to allow jslint to find libs/loader.js
+jslint-ui:
+ cd $(top_srcdir)/install/ui; \
+ $(MKDIR_P) js; \
+ rm -f js/libs; \
+ $(LN_S) ../src/libs js/libs; \
+ jsl -nologo -nosummary -nofilelisting -conf jsl.conf; \
+ rm js/libs; \
+ rmdir js
+
+jslint-ui-test:
+ cd $(top_srcdir)/install/ui/test; \
+ jsl -nologo -nosummary -nofilelisting -conf jsl.conf
+
+jslint-html:
+ cd $(top_srcdir)/install/html; \
+ jsl -nologo -nosummary -nofilelisting -conf jsl.conf