Module: check_mk
Branch: master
Commit: 481f75988b5093ecad67c5d62317880e645a65ec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=481f75988b5093…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Nov 14 09:02:04 2018 +0100
Add Clang-style output to improve our CI.
Change-Id: I89c3024c3fc7c8990aca12e7a2297d31cc01b364
---
tests/Makefile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 13c6e6f..cd905de 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -51,12 +51,14 @@ test-format-python: $(VENV) ../.style.yapf
# Explicitly specify --style [FILE] to prevent costly searching in parent directories
# for each file specified via command line
#
-# Saw some mixed up lines on stdout after adding the --parallel option. Leaving it on
-# for the moment to get the performance boost this option brings.
+# There are some mixed up lines on stdout caused by the --parallel option.
+# Nevertheless, we keep that option to get a big performance boost. GitHub issue
+# opened for this problem:
https://github.com/google/yapf/issues/644.
PYTHON_FILES=$${PYTHON_FILES-$$(./find-python-files)} ; \
- $(YAPF) --parallel --style ../.style.yapf --verbose --diff $$PYTHON_FILES \
- | grep -e "^Reformatting " -e "(reformatted)$$" \
- | awk '{if ($$1 == "+++") { print "Unformatted: "$$2 } else
{print "Checking "$$2"..."}}' ; exit $${PIPESTATUS[0]}
+ $(YAPF) --parallel --style ../.style.yapf --verbose --diff $$PYTHON_FILES | \
+ grep '^+++ .*(reformatted)$$' | \
+ sed -e 's/^+++ //' -e 's/[[:blank:]]*(reformatted)$$/:1:1: error: file
needs formatting/' ; \
+ exit $${PIPESTATUS[0]}
test-gui-crawl: $(VENV)
$(PYTEST) -T gui_crawl