Small note on static analyzer, includes and build times...
Albert Thuswaldner
albert.thuswaldner at gmail.com
Mon Feb 27 14:07:50 PST 2012
Hi,
There has been some interesting discussions here on the mailinglist
about static analyzer tools, unused includes and the impact of the
physical code structure on build times. This got me distracted from
what I normally do here and after some short time searching the web, I
stumbled upon this:
http://gamesfromwithin.com/physical-structure-and-c-part-1-a-first-look
http://gamesfromwithin.com/physical-structure-and-c-part-2-build-times
Although this did not contain much more info than what has already
surfaced in the discussions here, I found it a quite interesting read.
I also loved the idea how he uses doxygen to analyze the code. This
approach is of course very hackarish and limited compared with a
dedicated tool, however I just had to try it...
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...
/Albert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: analyze.log
Type: text/x-log
Size: 103617 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120227/2bf397c9/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Doxyfile
Type: application/octet-stream
Size: 51147 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120227/2bf397c9/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: analyze_includes.pl
Type: application/x-perl
Size: 8575 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120227/2bf397c9/attachment-0003.bin>
More information about the LibreOffice
mailing list