From 2326c414c04ac80aeca8222e60e93b834db2959b Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Feb 19 2018 14:58:51 +0000 Subject: fastcheck: do not test context in pycodestyle `git diff` shows also context lines by default. When passed to pycodestyle it can produce errors unrelated to changed lines. It prevents running of subsequent checks. Limiting context to 0 lines by `git diff -U0` enables to test only the modified lines and allows to run subsequent checks. Reviewed-By: Christian Heimes --- diff --git a/Makefile.am b/Makefile.am index a4381dd..21fb6d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -215,7 +215,7 @@ endif echo -e "Fast linting files:\n$${FILES}\n"; \ echo "pycodestyle"; \ echo "-----------"; \ - git diff $${MERGEBASE} | \ + git diff -U0 $${MERGEBASE} | \ $(PYTHON) -m pycodestyle --diff || exit $$?; \ echo -e "\npylint"; \ echo "------"; \