See commit message, yacctab.py causes lint errors and must be excluded


Patch attached.

From b8059400c5adf050576854a60455b94eed6e9cfb Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Mon, 6 Jun 2016 16:20:07 +0200
Subject: [PATCH] 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
---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 210b7ac3f1c1f5d6b70a424187de15419b516abf..3251deba35e2129e6192bc4db599c1a07be056a7 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to