diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-07-03 16:41:02 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-07-03 16:41:02 +0200 |
commit | 5a8549c6edd0b18fa2315045622bca0f91853796 (patch) | |
tree | 4623aec4206d9338e5bcf16a2b71c8898632df80 /run-static-analysis.sh | |
parent | fd9de0086d10ee236dd24d51d93f60edf52cd89c (diff) | |
parent | 5651680bbde34de2713d06e868416145e269cb7c (diff) | |
download | nx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.tar.gz nx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.tar.bz2 nx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.zip |
Merge branch 'mjtrangoni-WIP-add-cppcheck' into 3.6.x
Attributes GH PR #678: https://github.com/ArcticaProject/nx-libs/pull/678
Diffstat (limited to 'run-static-analysis.sh')
-rwxr-xr-x | run-static-analysis.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/run-static-analysis.sh b/run-static-analysis.sh new file mode 100755 index 000000000..0524c469a --- /dev/null +++ b/run-static-analysis.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [[ "${STATIC_ANALYSIS}" == "yes" ]]; then + # cppcheck + if ! [ -x "$(command -v cppcheck)" ]; then + echo 'Error: cppcheck is not installed.' >&2 + exit 1 + fi + CPPCHECK_OPTS='--error-exitcode=0 --force --quiet' + # we exclude some external projects + CPPCHECK_EXCLUDES='-i ./nx-X11/extras/Mesa* -i ./nx-X11/extras/Mesa_* -i nx-X11/programs/Xserver/GL/mesa*' + echo "$(cppcheck --version):"; + cppcheck $CPPCHECK_OPTS $CPPCHECK_EXCLUDES .; +fi |