From aaeccb03f427fc9d5ddfc469d2f4affe49edd61d Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 9 Oct 2023 09:05:27 -0700 Subject: [PATCH] Add cppcheck to PR workflow --- .github/workflows/pr.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c60372c..46ea119 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -31,13 +31,22 @@ jobs: with: submodules: recursive + - name: Install cppcheck + run: | + sudo apt-get update + sudo apt-get install -y cppcheck + + - name: Run cppcheck + run: | + cppcheck src/*.c --enable=warning --error-exitcode=1 --force + - name: esp-idf build library uses: espressif/esp-idf-ci-action@main with: esp_idf_version: ${{ matrix.idf_ver }} target: ${{ matrix.idf_target }} path: "example/" - command: apt update && apt install -y python3-venv && idf.py build + command: apt-get update && apt-get install -y python3-venv && idf.py build - name: esp-idf build tests uses: espressif/esp-idf-ci-action@main