mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
14c1c8dfd0
commit
f31a489d24
26
Makefile.am
26
Makefile.am
@ -49,7 +49,10 @@ rpms: dist-gzip rpmroot rpmdistdir
|
|||||||
if WITH_PYLINT
|
if WITH_PYLINT
|
||||||
PYLINT_TARGET = pylint
|
PYLINT_TARGET = pylint
|
||||||
endif WITH_PYLINT
|
endif WITH_PYLINT
|
||||||
lint: $(PYLINT_TARGET)
|
if WITH_JSLINT
|
||||||
|
JSLINT_TARGET = jslint
|
||||||
|
endif WITH_JSLINT
|
||||||
|
lint: $(PYLINT_TARGET) $(JSLINT_TARGET)
|
||||||
|
|
||||||
.PHONY: pylint
|
.PHONY: pylint
|
||||||
pylint:
|
pylint:
|
||||||
@ -66,3 +69,24 @@ pylint:
|
|||||||
echo "Pylint is running, please wait ..."; \
|
echo "Pylint is running, please wait ..."; \
|
||||||
PYTHONPATH=$(top_srcdir) $(PYLINT) \
|
PYTHONPATH=$(top_srcdir) $(PYLINT) \
|
||||||
--rcfile=$(top_srcdir)/pylintrc $${FILES}
|
--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
|
||||||
|
15
configure.ac
15
configure.ac
@ -427,6 +427,21 @@ fi
|
|||||||
AC_SUBST([PYLINT])
|
AC_SUBST([PYLINT])
|
||||||
AM_CONDITIONAL([WITH_PYLINT], [test "x${PYLINT}" != "xno"])
|
AM_CONDITIONAL([WITH_PYLINT], [test "x${PYLINT}" != "xno"])
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_WITH([jslint],
|
||||||
|
AS_HELP_STRING([--with-jslint=path to jsl],
|
||||||
|
[path to JavaScript lint]),
|
||||||
|
dnl --without-jslint will set JSLINT=no
|
||||||
|
[JSLINT=$with_jslint],
|
||||||
|
[AC_PATH_PROG([JSLINT], [jsl])]
|
||||||
|
)
|
||||||
|
if test "x${JSLINT}" == "x"; then
|
||||||
|
AC_MSG_ERROR([cannot find JS lint])
|
||||||
|
fi
|
||||||
|
AC_SUBST([JSLINT])
|
||||||
|
AM_CONDITIONAL([WITH_JSLINT], [test "x${JSLINT}" != "xno"])
|
||||||
|
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user