Filter clang-tidy output on Drone for errors
authorStephan Beyer <s-beyer@gmx.net>
Tue, 7 Jul 2020 06:51:05 +0000 (08:51 +0200)
committerKevin Ottens <ervin@ipsquad.net>
Wed, 8 Jul 2020 12:08:41 +0000 (14:08 +0200)
The run-clang-tidy is very verbose and prints a lot of unneccessary
information.  This commit greps for errors in the output.
Moreover, we add the -quiet switch.

As a desired "side" effect, this commit repairs the issue of
run-clang-tidy-6.0 that it does not return a usable exit code.
Hence clang-tidy errors will lead to CI failures now.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
.drone.yml

index 96c75c1fa533dcb3fb7d3552fea480d516c7849c..1fa660a7b45e3784b0f92a9ff030767209cbe0c8 100644 (file)
@@ -89,7 +89,7 @@ steps:
       chown -R test:test . &&
       su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test"
     # Static analysis with clang-tidy
-    - run-clang-tidy-6.0 -p build
+    - "! run-clang-tidy-6.0 -p build -quiet | grep -A 5 ': error:'"
 trigger:
   branch:
     - master