[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ada1wi5npam.fsf@cisco.com>
Date: Fri, 27 Apr 2007 20:36:17 -0700
From: Roland Dreier <rdreier@...co.com>
To: Dave Jones <davej@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Randy Dunlap <randy.dunlap@...cle.com>,
linux-kernel@...r.kernel.org
Subject: Re: checkpatch, a patch checking script.
> http://www.codemonkey.org.uk/projects/checkpatch/example.log shows
> what fell out of running it on my mbox of lkml from the past month.
> Some of them are kinda noisy, and perhaps should be moved under --pedantic
>
> I'm all ears for additional regexps, bug reports or other suggestions.
Looks great... however I notice a few obvious false positives in the
example log:
> Don't init statics to 0/NULL:
> 94312:+static const struct in6_addr in6addr_v4mapped = { { { [10] = 0xff, [11] = 0xff } } };
ummm?
> 137054:+static uint32_t drvr_ver = 0x02200207;
that ain't zero...
> 230079:+ path->static_rate = 0;
and that ain't a static variable.
I guess trying to parse C in a regexp is a little tricky.
Also, it would be nice to be able to do something like
git diff v2.6.20..|perl ~/checkpatch.pl -
rather than having to create a temp file -- as it stands that command
produces
unknown option: -
usage: findbugs.pl [-options] file(s)
-allsource : check entire source file, not just '+' patch lines
-pedantic : TBD
-style : TBD
-v, --verbose : verbose
-h, --help : this help text
Version: 002
And even worse
git diff v2.6.20..|perl ~/checkpatch.pl
just silently does nothing (maybe a "no input files" warning would be
a good clue for people).
- R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists