Simple script for checking each header file alone for proper inclusions, ...

Hi, as most of you know I check from time to time public header files in trunk for proper inclusions and other errors. I most of the time use a g++ 4.3 snapshot and strongest compiler warning options to avoid getting errors or warnings in user code once a new version of Boost is released. There are still many bugs pending in Trac and most are ignored since more than 3 months but John asked me to publish my script. It is indeed very simple but finds nervertheless sufficient errors to be useful. It can probably be extended to check for circular dependencies, ... The usage is simple: Just start boost-check from boost/ with option -l followed by the directoy you want to test: $ ../boost-check -l iostreams It outputs each header file it checks together with possible compiler output (warnings and errors). As I start it in a Linux environment I have to skip all win32 related files as these will create errors (missing windows.h, ...). All files to be skipped can be added to a file (I call it "skip") which is respected by the script. Also all files which include skipped files will be skipped. Once an error is found I prefer to open the file in the vim editor so that I can inspect the problem. vim supports the command ":make" which calls a trivial Makefile (in /tmp) and jumps to all errors and warnings (usual :cw, :cn, :cN commands). I currently commented the call to vim out but you can outcomment it at the end of the script again. I doubt that it will currently be useful for others as I tested already all libraries with active maintainer but you maybe want to test current code changes prior to commit with it (so it found e.g. today an error in iostream introduced during the last hours). Jens

Jens Seidel wrote:
On Tue, Jan 08, 2008 at 05:50:30PM +0100, Jens Seidel wrote:
It is indeed very simple but finds nervertheless sufficient errors to be useful. It can probably be extended to check for circular dependencies,
Sounds like it would make a great addition to the inspect tool. -- Eric Niebler Boost Consulting www.boost-consulting.com

Jens Seidel wrote:
I doubt that it will currently be useful for others as I tested already all libraries with active maintainer but you maybe want to test current code changes prior to commit with it (so it found e.g. today an error in iostream introduced during the last hours).
If you can get this script near perfect it might be a good idea to use it as a svn pre-commit hook. In general, have you (boost community) considered using any other pre-commit hooks to test coding standard compliance etc? Best Regards, Johan Torp -- View this message in context: http://www.nabble.com/Simple-script-for-checking-each-header-file-alone-for-... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (3)
-
Eric Niebler
-
Jens Seidel
-
Johan Torp