URL: https://github.com/freeipa/freeipa/pull/1438
Author: tiran
 Title: #1438: Make fastlint even faster
Action: opened

PR body:
"""
- Check pycodestyle before pylint. pycodestyle takes seconds while
  pylint can easily take half a minute or more.
- Fix exit, needs two $
- Add some newlines to make output more readable

Signed-off-by: Christian Heimes <chei...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1438/head:pr1438
git checkout pr1438
From 9641d29eba9e98f0aece9e8359930433aac24bed Mon Sep 17 00:00:00 2001
From: Christian Heimes <chei...@redhat.com>
Date: Fri, 5 Jan 2018 11:19:18 +0100
Subject: [PATCH] Make fastlint even faster

- Check pycodestyle before pylint. pycodestyle takes seconds while
  pylint can easily take half a minute or more.
- Fix exit, needs two $
- Add some newlines to make output more readable

Signed-off-by: Christian Heimes <chei...@redhat.com>
---
 Makefile.am | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 85c020506f..61d385ef59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -210,17 +210,17 @@ endif
 	FILES=$$(git diff --name-only $${MERGEBASE} \
 	    | grep -E '\.py$$'); \
 	if [ -n "$${FILES}" ]; then \
-		echo "Fast linting files: $${FILES}"; \
-		echo "pylint"; \
+		echo -e "Fast linting files:\n$${FILES}\n"; \
+	    echo "pycodestyle"; \
+	    echo "-----------"; \
+	    git diff $${MERGEBASE} | \
+	        $(PYTHON) -m pycodestyle --diff || exit $$?; \
+		echo -e "\npylint"; \
 		echo "------"; \
 	    PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON) -m pylint \
 	        --rcfile=$(top_srcdir)/pylintrc \
 	        --load-plugins pylint_plugins \
-	        $${FILES} || exit $?; \
-	    echo "pycodestyle"; \
-	    echo "-----------"; \
-	    git diff $${MERGEBASE} | \
-	        $(PYTHON) -m pycodestyle --diff || exit $?; \
+	        $${FILES} || exit $$?; \
 	else \
 	    echo "No modified Python files found"; \
 	fi
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to