From c6be5068a1d000a73a6c9ee6fe6559a53c7c5e07 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 23 Sep 2023 13:56:47 +0000 Subject: [PATCH] activate docker cppcheck --- .github/workflows/build_check.yml | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 85b2c525..ab2ee2e9 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -70,24 +70,24 @@ jobs: - name: Run PlatformIO Check run: pio check --fail-on-defect high --fail-on-defect medium --fail-on-defect low -e lora_board -# cppcheck-docker: -# name: Run cppcheck in Docker -# runs-on: ubuntu-latest -# env: -# CPPCHECK_ARGS: --enable=all --std=c++20 --inline-suppr -I lib/BoardFinder -I lib/ConfigurationManagement -I lib/Display -I lib/LoRa -I lib/LoRa_APRS -I lib/NTPClient -I lib/PowerManagement -I lib/System -I lib/TimeLib -i lib/Display -i lib/LoRa -i lib/NTPClient -i lib/TimeLib src lib -# steps: -# - name: checkout code -# uses: actions/checkout@v3 -# - run: docker pull facthunder/cppcheck:latest -# - name: Run cppcheck and print result -# run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS" -# - name: Run cppcheck and create html -# run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output" -# - name: Upload report -# uses: actions/upload-artifact@v3 -# with: -# name: Cppcheck Report -# path: output + cppcheck-docker: + name: Run cppcheck in Docker + runs-on: ubuntu-latest + env: + CPPCHECK_ARGS: --enable=all --std=c++20 --suppress=*:*.pio\* --inline-suppr --suppress=unusedFunction --suppress=shadowFunction:*TimeLib.cpp --suppress=unreadVariable:*TimeLib.cpp --suppress=badBitmaskCheck:*project_configuration.cpp src + steps: + - name: checkout code + uses: actions/checkout@v3 + - run: docker pull facthunder/cppcheck:latest + - name: Run cppcheck and print result + run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS" + - name: Run cppcheck and create html + run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output" + - name: Upload report + uses: actions/upload-artifact@v3 + with: + name: Cppcheck Report + path: output hw_testing: name: Hardware Testing