Make clang-tidy fail when it ought to.

clang-tidy exits with an error code of 0 if the code compiles, even if
there are warnings.  Make it generate a file with the errors and fail
the test if this file exists.

Also remove the -fix flag - we don't want clang-tidy to fix things in CI
(yet?).
This commit is contained in:
David Chisnall 2019-04-30 15:02:55 +01:00
Родитель 4f8c7ba258
Коммит d259a87d03
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -217,6 +217,7 @@ phases:
displayName: 'Clang-Format'
- script: |
clang-tidy-8 src/override/malloc.cc -header-filter="`pwd`/*" -fix -- -std=c++17 -mcx16
clang-tidy-8 src/override/malloc.cc -header-filter="`pwd`/*" -export-fixes=tidy.fail -- -std=c++17 -mcx16
if [ -f tidy.fail ] ; then exit 1 ; fi
displayName: 'Clang-Tidy'