Exclude unneeded dirs and files from pylint check

Generated files or paths that does not contain src files should be
skipped:
* yacctab.py - autogenerated
* lextab.py - autogenerated
* dist/* - doesn't contain usefule src files

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
Martin Basti 2016-06-06 16:20:07 +02:00
parent 05878f1153
commit 1d9425dab7

View File

@ -137,8 +137,13 @@ lint: bootstrap-autogen
# find all python modules and executable python files outside modules for pylint check
FILES=`find . \
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
-path '*/.*' -o \
-path './dist/*' -o \
-path './lextab.py' -o \
-path './yacctab.py' -o \
-name '*~' -o \
-name \*.py -print -o \
-type f \! -path '*/.*' \! -name '*~' -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
echo "Pylint is running, please wait ..."; \
PYTHONPATH=. pylint --rcfile=pylintrc $(PYLINTFLAGS) $$FILES || $(LINT_IGNORE_FAIL)
$(MAKE) -C install/po validate-src-strings || $(LINT_IGNORE_FAIL)