diff options
author | Tomas Krizek <tkrizek@redhat.com> | 2016-11-16 12:51:58 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-16 16:58:52 +0100 |
commit | 28c5e128c823f32787a4bde87e6b248928a2cd0a (patch) | |
tree | eb03c07dba0b4bcc0922a2e085ef1e049b9a9900 | |
parent | 9006ed34bb1edfaafc3345c1128800dc802c14ff (diff) | |
download | freeipa-28c5e128c823f32787a4bde87e6b248928a2cd0a.tar.gz freeipa-28c5e128c823f32787a4bde87e6b248928a2cd0a.tar.xz freeipa-28c5e128c823f32787a4bde87e6b248928a2cd0a.zip |
Build: ignore rpmbuild for lint target
Exclude rpmbuild from pylint checks when make lint is executed.
Clean up the current find expression.
https://fedorahosted.org/freeipa/ticket/6418
Reviewed-By: Petr Spacek <pspacek@redhat.com>
-rw-r--r-- | Makefile.am | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 159d396dd..0ef543347 100644 --- a/Makefile.am +++ b/Makefile.am @@ -126,17 +126,21 @@ apilint: polint: $(MAKE) -C $(srcdir)/po validate-src-strings +# Run pylint for all python files. Finds all python files/packages, skips +# folders rpmbuild, freeipa-* and dist. Skip (match, but don't print) .*, +# *.in, *~. Finally print all python files, including scripts that do not +# have python extension. .PHONY: pylint pylint: FILES=`find $(top_srcdir) \ -type d -exec test -e '{}/__init__.py' \; -print -prune -o \ - -path '*/.*' -o \ - -path '*.in' -o \ - -path './dist/*' -o \ - -path './lextab.py' -o \ - -path './yacctab.py' -o \ + -path './rpmbuild' -prune -o \ + -path './freeipa-*' -prune -o \ + -path './dist' -prune -o \ + -name '.*' -o \ + -name '*.in' -o \ -name '*~' -o \ - -name \*.py -print -o \ + -name '*.py' -print -o \ -type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \ echo "Pylint is running, please wait ..."; \ PYTHONPATH=$(top_srcdir) $(PYLINT) \ |