Small note on static analyzer, includes and build times...
sbergman at redhat.com
Tue Feb 28 00:03:58 PST 2012
On 02/27/2012 11:07 PM, Albert Thuswaldner wrote:
> What I did:
> 1: I created a folder "doxygen" in the root of the sc module.
> 2. Adapted his script and put it in this folder.
> 3. Made a simple doxygen config file (Doxyfile) and ran doxygen
> 4. finally ran the script: ./analyze_includes.pl> analyze.log
> Anyway, I have not analyzed the results myself in detail but it is a
> shame it only detects unused includes in header files.
> I've included the files If someone else wants to have a go...
Nice approach. :) One remark re "Looking for .cxx files whose first
include is not the header file...": I did not look into the articles
you cite to see whether or why they advocate to include the
corresponding header first in the .cxx file (a common reason to do so is
to ensure that the header is self contained), but note that LO requires
that each file includes sal/config.h first thing (even if your mined
data indicates that this rule is largely ignored).
Personally, I've grown used to sorting includes from general to
specific, with blocks
for no real reason.
More information about the LibreOffice