From d2119284d3a09e01e73331a70e08fc2487d7adab Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 18 Feb 2024 15:23:17 -0700 Subject: [PATCH] Port travis cppcheck args to workflow --- .github/workflows/cppcheck.yml | 12 +++++++++++ .travis.sh | 38 ---------------------------------- .travis.yml | 19 ----------------- 3 files changed, 12 insertions(+), 57 deletions(-) delete mode 100755 .travis.sh delete mode 100644 .travis.yml diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 9ee8f5b9b..782b56ef8 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -12,5 +12,17 @@ jobs: uses: deep5050/cppcheck-action@v3.0 with: github_token: ${{secrets.GITHUB_TOKEN}} + enable: 'style' + force: 'enable' + other_options: >- + '--suppress=incorrectStringBooleanError ' + '--suppress=cstyleCast ' + '--suppress=variableScope ' + '--suppress=commaSeparatedReturn ' + '--suppress=variableHidingEnum ' + '--suppress=invalidPointerCast ' + '--suppress=invalidscanf ' + '--inline-suppr ' + '-I headers hc common headers unix win32' - run: cmake -E cat cppcheck_report.txt diff --git a/.travis.sh b/.travis.sh deleted file mode 100755 index ab6317885..000000000 --- a/.travis.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# Build script for travis-ci.org builds to handle compiles and static -# analysis when ANALYZE=true. -# -mkdir build -cd build -if [ $ANALYZE = "true" ]; then - if [ "$CC" = "clang" ]; then - scan-build -h - scan-build cmake -G "Unix Makefiles" .. - scan-build -enable-checker security.FloatLoopCounter \ - -enable-checker security.insecureAPI.UncheckedReturn \ - --status-bugs -v \ - make -j 8 - else - cd .. - cppcheck --help - cppcheck --template "{file}({line}): {severity} ({id}): {message}" \ - --enable=style --force --std=c++11 -j 8 \ - --suppress=incorrectStringBooleanError \ - --suppress=cstyleCast \ - --suppress=variableScope \ - --suppress=commaSeparatedReturn \ - --suppress=variableHidingEnum \ - --suppress=invalidPointerCast \ - --suppress=invalidscanf \ - --inline-suppr \ - -I headers hc common headers unix win32 2> cppcheck.txt - if [ -s cppcheck.txt ]; then - cat cppcheck.txt - exit 1 - fi - fi -else - cmake -G "Unix Makefiles" .. - make -fi diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 30a89dc85..000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: cpp - -compiler: - - gcc - - clang - -env: - - ANALYZE=false - - ANALYZE=true - -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get -qq -d update - -install: - - if [ $CC = 'gcc' -a $ANALYZE = 'true' ]; then sudo apt-get install cppcheck; cppcheck --version; fi - -script: - - ./.travis.sh