I am in the process of  teaching cppcheck about our source tree. So far I have reduced the number 
of warnings from ~9000 to ~100. In order for our weekly Cppcheck Report to benefit from these, I 
need to automate the process. Here is the command I used to list all of our include directories:
$ find . -type d \( -name "inc" -o -name "include" \) |sort > inc.txt
This cuts the warning from 9000 to 300, but there are some oddball #includes that this misses. Here 
is an example from 'vcl/qt5/Qt5Bitmap.cxx':
#include <Qt5Bitmap.hxx><--- Include file:  not found.
The complete path of this file is: ./vcl/inc/qt5/Qt5Bitmap.hxx
And my script already taught cppcheck about: ./vcl/inc
So I need to manually add: vcl/inc/qt5
So my question is how should this be remedied? 
A) Change the include path to follow all 99% of the other include
like this: 
#include <qt5/Qt5Bitmap.hxx>
B) Move the include file to an include folder
C) Or Keep a list of these oddballs and append them the results of my find command?
D) Write a smarter find command. Ideas?
Is there a guideline on include naming?  Many of these oddballs seem to be in folders that have 
been recently moved around the source tree. (vcl/inc/qt5 was just moved a few months ago)
So far, here is a list of the oddball include locations needed outside of those my find command 
located:
#include <Qt5Bitmap.hxx> :  vcl/inc/qt5
#include <charttest.hxx> : chart2/qa/extras
#include <gst/interfaces/xoverlay.h> : avmedia/source/gstreamer
#include <: I forget :(> : include/rtl 
-Luke
Context
- Best way to handle oddball header #includes for Cppcheck Report? · Luke Benes
 
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.