From e569477ac043ee365ed3ef7d6b3474a9ee2ba870 Mon Sep 17 00:00:00 2001 From: claraC Date: Tue, 14 May 2019 23:32:16 +0200 Subject: [PATCH 1/4] Cppcheck configuration --- .travis.yml | 2 ++ scripts/checkstatic_cppcheck.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100755 scripts/checkstatic_cppcheck.sh diff --git a/.travis.yml b/.travis.yml index 066c6805..dde29c69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ addons: - gcc-arm-embedded - libbluetooth-dev - libglu1-mesa + - cppcheck install: - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh @@ -32,6 +33,7 @@ before_script: script: - ./scripts/checkformat_clang.sh - ./scripts/checkformat_checkpatch.sh + - ./scripts/checkstatic_cppcheck.sh - make -C src - source activate bulebule - pytest -sv diff --git a/scripts/checkstatic_cppcheck.sh b/scripts/checkstatic_cppcheck.sh new file mode 100755 index 00000000..51c8abbb --- /dev/null +++ b/scripts/checkstatic_cppcheck.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +cd .. + +cppcheck --enable=all src/ -isrc/simulation -isrc/printf -I src/mmlib -I src --check-config --suppress=missingIncludeSystem --quiet --error-exitcode=1 + +cppcheck --enable=all src/ -isrc/simulation -isrc/printf -I src/mmlib -I src --template=gcc --suppress=unusedFunction --suppress=missingInclude --quiet --error-exitcode=1 + + + + From c51f80f0274801799d4dd2939a4846969989dc7b Mon Sep 17 00:00:00 2001 From: claraC Date: Tue, 14 May 2019 23:44:00 +0200 Subject: [PATCH 2/4] fixup! Cppcheck configuration --- scripts/checkstatic_cppcheck.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/checkstatic_cppcheck.sh b/scripts/checkstatic_cppcheck.sh index 51c8abbb..a97b38f5 100755 --- a/scripts/checkstatic_cppcheck.sh +++ b/scripts/checkstatic_cppcheck.sh @@ -2,10 +2,6 @@ cd .. -cppcheck --enable=all src/ -isrc/simulation -isrc/printf -I src/mmlib -I src --check-config --suppress=missingIncludeSystem --quiet --error-exitcode=1 - -cppcheck --enable=all src/ -isrc/simulation -isrc/printf -I src/mmlib -I src --template=gcc --suppress=unusedFunction --suppress=missingInclude --quiet --error-exitcode=1 - - - +cppcheck --enable=all src/ -isrc/simulation -isrc/printf -Isrc/mmlib -Isrc --check-config --suppress=missingIncludeSystem --quiet --error-exitcode=1 +cppcheck --enable=all src/ -isrc/simulation -isrc/printf -Isrc/mmlib -Isrc --template=gcc --suppress=unusedFunction --suppress=missingInclude --quiet --error-exitcode=1 From b4a36f8200e72cdffa9d6c385a51a6022a6ec4a9 Mon Sep 17 00:00:00 2001 From: claraC Date: Wed, 15 May 2019 00:06:18 +0200 Subject: [PATCH 3/4] fixup! fixup! Cppcheck configuration --- scripts/checkstatic_cppcheck.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/checkstatic_cppcheck.sh b/scripts/checkstatic_cppcheck.sh index a97b38f5..3a5f01e0 100755 --- a/scripts/checkstatic_cppcheck.sh +++ b/scripts/checkstatic_cppcheck.sh @@ -1,7 +1,9 @@ #!/bin/bash -cd .. +root=$(dirname $0)/../ + +cd $root cppcheck --enable=all src/ -isrc/simulation -isrc/printf -Isrc/mmlib -Isrc --check-config --suppress=missingIncludeSystem --quiet --error-exitcode=1 -cppcheck --enable=all src/ -isrc/simulation -isrc/printf -Isrc/mmlib -Isrc --template=gcc --suppress=unusedFunction --suppress=missingInclude --quiet --error-exitcode=1 +cppcheck --enable=all src/ -isrc/simulation -isrc/printf -Isrc/mmlib -Isrc --suppress=unusedFunction --suppress=missingInclude --quiet --error-exitcode=1 From 0595084441c027baf45cd67e459fc399d33bac1c Mon Sep 17 00:00:00 2001 From: claraC Date: Wed, 15 May 2019 00:08:13 +0200 Subject: [PATCH 4/4] fixup! fixup! fixup! Cppcheck configuration --- scripts/checkstatic_cppcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkstatic_cppcheck.sh b/scripts/checkstatic_cppcheck.sh index 3a5f01e0..083701ab 100755 --- a/scripts/checkstatic_cppcheck.sh +++ b/scripts/checkstatic_cppcheck.sh @@ -1,6 +1,6 @@ #!/bin/bash -root=$(dirname $0)/../ +root=$PWD/../ cd $root