Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

run_cppcheck.sh 728 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  1. #!/usr/bin/env bash
  2. #
  3. # Run cppcheck to check C source codes
  4. #
  5. CPPCHECK="cppcheck --error-exitcode=1 --language=c --std=c99 ${CPPCHECK_EXTRA_OPTIONS:-"--max-configs=1"}"
  6. if [ "$#" == 0 ]; then
  7. echo "Usage: bash run_cppcheck.sh srcdir"
  8. exit 1
  9. fi
  10. if ! [ -x "$(command -v cppcheck)" ]; then
  11. echo 'Error: cppcheck is not found in your search PATH.' >&2
  12. exit 0
  13. fi
  14. SRCDIR=$1
  15. find ${SRCDIR} -name '*.[ch]' \
  16. ! -name 'PSL_ISO-*.h' \
  17. ! -name 'PSL_ISOLatin*.h' \
  18. ! -name 'PSL_Standard*.h' \
  19. ! -name 'gmt_colornames.h' \
  20. ! -name 'gmt_cpt_masters.h' \
  21. ! -name 'gmt_datasets.h' \
  22. ! -name 'gmt_media_name.h' \
  23. ! -name 'gmt_unique.h' \
  24. ! -name 'mergesort.c' \
  25. -exec ${CPPCHECK} {} +
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...