From 6fe3228fb2f62d30604d9bc5507ea2e6b1642d82 Mon Sep 17 00:00:00 2001 From: Christian Heimes 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 Reviewed-By: Tibor Dudlak --- Makefile.am | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 85c020506..1e200f117 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 "------"; \ - PYTHONPATH=$(abspath $(top_srcdir)) $(PYTHON) -m pylint \ - --rcfile=$(top_srcdir)/pylintrc \ - --load-plugins pylint_plugins \ - $${FILES} || exit $?; \ + echo -e "Fast linting files:\n$${FILES}\n"; \ echo "pycodestyle"; \ echo "-----------"; \ git diff $${MERGEBASE} | \ - $(PYTHON) -m pycodestyle --diff || exit $?; \ + $(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 $$?; \ else \ echo "No modified Python files found"; \ fi