Question is: how can I suppress these warnings without using --suppress=missingIncludeSystem? What am I missing?
Project files in attachments. To setup, build and run analysis (assuming you install Qt from Qt Online Installer and using Ninja) run from project root in terminal below commands, change user to yours or provide own path:
Hi,
I created basic QtWidgets project on Qt 5.15.2. File structure:
In CMakeLists.txt I added Cppcheck run target (see below for used options):
and provided there for example --libarary=qt option. But Cppcheck still reports missingIncludeSystem issues on Qt headers like:
Question is: how can I suppress these warnings without using --suppress=missingIncludeSystem? What am I missing?
Project files in attachments. To setup, build and run analysis (assuming you install Qt from Qt Online Installer and using Ninja) run from project root in terminal below commands, change user to yours or provide own path:
Tested on Ubuntu 22.04, Qt 5.15.2 and Cppcheck 2.12.1.
This is by design. Any missing header included by
<...>
is reported asmissingIncludeSystem
.It is by design.. but well I can understand that it is confusing.
We recommend that you use the
--library=qt
option when checking qt code. However this does not preventmissingIncludeSystem
warnings.Please ignore the
missingIncludeSystem
warnings about qt.