Skip to content

Commit a065c8e

Browse files
committed
[ci] Skip datarefs.inc with cppcheck
1 parent 9437e96 commit a065c8e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
sudo apt-get -y install cppcheck
7070
sudo cpan Path::Class
7171
cppcheck --template=gcc --inline-suppr --std=c++17 --enable=style,unusedFunction -i externals \
72-
--suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . 2> >(tee error.log >&2)
72+
-DCPPCHECK --force --suppressions-list=cppcheck.supp \
73+
--library=qt.cfg --library=posix.cfg . 2> >(tee error.log >&2)
7374
perl scripts/warnings.pl error.log
7475
7576
buildLinux:

src/xswiftbus/datarefs.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
#include <string>
1818
#include <cassert>
1919

20-
#include "datarefs.inc"
20+
// Avoid checking large auto-generated header with cppcheck
21+
#ifndef CPPCHECK
22+
# include "datarefs.inc"
23+
#endif
2124

2225
namespace XSwiftBus
2326
{

0 commit comments

Comments
 (0)