|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# output version |
| 4 | +bash .ci/printinfo.sh |
| 5 | + |
| 6 | +# tested with clang-tidy from llvm-6.0.0 |
| 7 | +# not tested with Travis-CI |
| 8 | + |
| 9 | +#### we use the main test sets: |
| 10 | +# readability |
| 11 | +# misc |
| 12 | +# clang-analyzer |
| 13 | +# google |
| 14 | +# performance |
| 15 | +# modernize |
| 16 | +# cert |
| 17 | +# bugprone |
| 18 | +# portability |
| 19 | + |
| 20 | +#### the following checks are skipped |
| 21 | +# google-readability-function-size |
| 22 | +# readability-function-size |
| 23 | +# google-readability-casting |
| 24 | +# readability-braces-around-statements |
| 25 | +# misc-macro-parentheses |
| 26 | +# clang-analyzer-valist.Uninitialized |
| 27 | + |
| 28 | +echo "Run clang-tidy version" |
| 29 | + |
| 30 | +clang-tidy --version || exit 1 |
| 31 | + |
| 32 | +echo "Run clang-tidy..." |
| 33 | + |
| 34 | +clang-tidy src/*/*.c src/*/*/*.c src/*/*/*/*.c src/*/*/*/*/*.c -warnings-as-errors='*' --quiet --checks=-*,\ |
| 35 | +readability-*,-readability-function-size,-readability-braces-around-statements,\ |
| 36 | +misc-*,-misc-macro-parentheses,\ |
| 37 | +clang-analyzer-*,-clang-analyzer-valist.Uninitialized,\ |
| 38 | +google-*,-google-readability-function-size,-google-readability-casting,\ |
| 39 | +performance-*,\ |
| 40 | +modernize-*,\ |
| 41 | +cert-*,\ |
| 42 | +bugprone-*,\ |
| 43 | +portability-* -- -DUSE_LTM -DLTM_DESC -Isrc/headers -I../libtommath || { echo "clang-tidy FAILED!"; exit 1; } |
| 44 | + |
| 45 | +echo "clang-tidy ok" |
| 46 | + |
| 47 | +exit 0 |
| 48 | + |
| 49 | +# ref: $Format:%D$ |
| 50 | +# git commit: $Format:%H$ |
| 51 | +# commit time: $Format:%ai$ |
0 commit comments