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 <cheimes@redhat.com>
This commit is contained in:
Petr Vobornik 2018-02-16 17:23:23 +01:00 committed by Tibor Dudlák
parent 364ffd5a0f
commit f316eb83dd
No known key found for this signature in database
GPG Key ID: 12B8BD343576CDF5

View File

@ -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 "------"; \