From a065c8e7370a012eb9e9a7264f7d4b4cc90fb761 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Sun, 16 Apr 2023 13:21:59 +0200 Subject: [PATCH] [ci] Skip datarefs.inc with cppcheck --- .github/workflows/build.yml | 3 ++- src/xswiftbus/datarefs.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1274b1af0..7bab89b63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,8 @@ jobs: sudo apt-get -y install cppcheck sudo cpan Path::Class cppcheck --template=gcc --inline-suppr --std=c++17 --enable=style,unusedFunction -i externals \ - --suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . 2> >(tee error.log >&2) + -DCPPCHECK --force --suppressions-list=cppcheck.supp \ + --library=qt.cfg --library=posix.cfg . 2> >(tee error.log >&2) perl scripts/warnings.pl error.log buildLinux: diff --git a/src/xswiftbus/datarefs.h b/src/xswiftbus/datarefs.h index ffe0ae8a5..ba555c32e 100644 --- a/src/xswiftbus/datarefs.h +++ b/src/xswiftbus/datarefs.h @@ -17,7 +17,10 @@ #include #include -#include "datarefs.inc" +// Avoid checking large auto-generated header with cppcheck +#ifndef CPPCHECK +# include "datarefs.inc" +#endif namespace XSwiftBus {