From 87e228a337ad1b0fc24662e2e4718648e192c18b Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Thu, 19 Jul 2018 10:23:34 +0800 Subject: [PATCH] Use cppcheck to scan the C++ code Fix #379 --- .travis.yml | 2 +- Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 84164a9d..c4fa44db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ before_install: - sudo docker build -t rcldocker . script: - - sudo docker run -v $(pwd):/root/rclnodejs --rm rcldocker bash -i -c 'cd /root/rclnodejs && ./scripts/build.sh && npm test' + - sudo docker run -v $(pwd):/root/rclnodejs --rm rcldocker bash -i -c 'cd /root/rclnodejs && cppcheck --enable=all src/*.cpp src/*.hpp && ./scripts/build.sh && npm test' diff --git a/Dockerfile b/Dockerfile index e33b98db..b50317a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,8 @@ RUN apt update && apt install -y \ python3-setuptools \ python3-yaml \ python3-colcon-common-extensions \ - cmake + cmake \ + cppcheck RUN pip3 install -U setuptools