Add jslint into Makefile

Also put jsl into dependencies.

The patch also split lint target into more smaller targets.
The purpose of this change is to add possibility to run only
fast jslint by using make jslint and don't waste time with pylint,
which can take a lot of time.

https://fedorahosted.org/freeipa/ticket/6161

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-08-02 17:57:24 +02:00 committed by Martin Basti
parent 50c53395de
commit 58da5fb4b9
2 changed files with 8 additions and 1 deletions

View File

@ -133,7 +133,7 @@ client-dirs:
echo "Without those directories ipa-client-install will fail" ; \ echo "Without those directories ipa-client-install will fail" ; \
fi fi
lint: bootstrap-autogen pylint: bootstrap-autogen
# find all python modules and executable python files outside modules for pylint check # find all python modules and executable python files outside modules for pylint check
FILES=`find . \ FILES=`find . \
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \ -type d -exec test -e '{}/__init__.py' \; -print -prune -o \
@ -146,8 +146,14 @@ lint: bootstrap-autogen
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \ -type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
echo "Pylint is running, please wait ..."; \ echo "Pylint is running, please wait ..."; \
PYTHONPATH=. pylint --rcfile=pylintrc $(PYLINTFLAGS) $$FILES || $(LINT_IGNORE_FAIL) PYTHONPATH=. pylint --rcfile=pylintrc $(PYLINTFLAGS) $$FILES || $(LINT_IGNORE_FAIL)
po-validate:
$(MAKE) -C install/po validate-src-strings || $(LINT_IGNORE_FAIL) $(MAKE) -C install/po validate-src-strings || $(LINT_IGNORE_FAIL)
jslint:
cd install/ui; jsl -nologo -nosummary -nofilelisting -conf jsl.conf || $(LINT_IGNORE_FAIL)
lint: pylint po-validate jslint
test: test:
./make-test ./make-test

View File

@ -87,6 +87,7 @@ BuildRequires: python-dns >= 1.11.1
BuildRequires: libsss_idmap-devel BuildRequires: libsss_idmap-devel
BuildRequires: libsss_nss_idmap-devel >= 1.14.0 BuildRequires: libsss_nss_idmap-devel >= 1.14.0
BuildRequires: java-headless BuildRequires: java-headless
BuildRequires: jsl
BuildRequires: rhino BuildRequires: rhino
BuildRequires: libverto-devel BuildRequires: libverto-devel
BuildRequires: systemd BuildRequires: systemd