From ed2ec2e3edce0208735c564b9dd279627fa93f78 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Tue, 3 Jul 2018 22:43:26 +0200 Subject: [PATCH] add script .ci/clang-tidy.sh --- .ci/clang-tidy.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 .ci/clang-tidy.sh diff --git a/.ci/clang-tidy.sh b/.ci/clang-tidy.sh new file mode 100755 index 00000000..c58a6760 --- /dev/null +++ b/.ci/clang-tidy.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# output version +bash .ci/printinfo.sh + +# tested with clang-tidy from llvm-6.0.0 +# not tested with Travis-CI + +#### we use the main test sets: +# readability +# misc +# clang-analyzer +# google +# performance +# modernize +# cert +# bugprone +# portability + +#### the following checks are skipped +# google-readability-function-size +# readability-function-size +# google-readability-casting +# readability-braces-around-statements +# misc-macro-parentheses +# clang-analyzer-valist.Uninitialized + +echo "Run clang-tidy version" + +clang-tidy --version || exit 1 + +echo "Run clang-tidy..." + +clang-tidy src/*/*.c src/*/*/*.c src/*/*/*/*.c src/*/*/*/*/*.c -warnings-as-errors='*' --quiet --checks=-*,\ +readability-*,-readability-function-size,-readability-braces-around-statements,\ +misc-*,-misc-macro-parentheses,\ +clang-analyzer-*,-clang-analyzer-valist.Uninitialized,\ +google-*,-google-readability-function-size,-google-readability-casting,\ +performance-*,\ +modernize-*,\ +cert-*,\ +bugprone-*,\ +portability-* -- -DUSE_LTM -DLTM_DESC -Isrc/headers -I../libtommath || { echo "clang-tidy FAILED!"; exit 1; } + +echo "clang-tidy ok" + +exit 0 + +# ref: $Format:%D$ +# git commit: $Format:%H$ +# commit time: $Format:%ai$