On Thu, Mar 05, 2009 at 08:48:27PM +0100, Jonas Oreland wrote:
> they use a hand-written perl script.
> it can be made to accept any style.
> it can likely be made such that it does not give any false-warnings
> but instead miss some real warnings...
> there script also works on patches...not files.
> (dont know how they do that though...and it's in perl which looks
> like black magic in my eyes)
The unified diff format isn't too hard to parse (once you get over that
the "documentation" is, unsurprisingly, wrong).
Then it looks at the changed lines (i.e. the /^\+ / lines). This has the
benefit of only getting you to fix your introduced problems rather than
everybody elses pre-existing ones.
Not sure how they deal with indenting... but since you have context, you
can look at what's around it (but outside that.. who knows).
Did look at porting it to for us at one stage... but that'd require, you
know, consistent code style :)