clang-tidy.sh 1.2 KB

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