lint for D

Bill Baxter dnewsgroup at billbaxter.com
Wed Jul 9 23:37:16 PDT 2008


Markus Koskimies wrote:
> On Thu, 10 Jul 2008 01:42:17 +0100, Bruce Adams wrote:

> 
> I must disagree with this. Just like D has integrated doc generator, I 
> would like to see it bundled with a tool doing all kinds of static checks 
> also; it need not to be integral inside, but released with compiler and 
> automatically invoked by the compiler. The reason for this hope is very 
> simple - it would make things simple from developers point of view. Just 
> write:
> 
> 	dmd <all my D files>
> 
> ...And it would not only compile the executable (possible recognizing 
> which files need to be recompiled, normally done by make), but also run 
> static checker. That's also the reason why I like the "-od" -style 
> options (telling directories to put things).

If the hypothetical lint tool existed, you could just write a script 
containing:

   <split up options>
   dmd $options_meant_for_dmd
   dlint $options_meant_for_dlint

There's just a bit of work to do there to filter out the options and 
split them into separate variables.  But if someone can write a lint 
tool, they should be able to figure out how to do that.  :-)

--bb



More information about the Digitalmars-d mailing list