Re: [RFC] checkpatch: add option to change warning return value.

From: Steven Rostedt
Date: Tue Mar 22 2011 - 21:41:26 EST


On Tue, Mar 22, 2011 at 04:22:46PM -0700, Sarah Sharp wrote:
>
> BTW, I'm not a perl hacker, and I don't really understand the reporting code,
> so someone who knows it (Andy?) should make the correct patch. I didn't notice
> before sending, but right now the warning count reporting is bogus, although
> the warnings don't make the script return an error code:
>

>
>
> Note that second-to-last patch should have said 3 warnings. So my patch needs
> to be changed, but I really do want this functionality.
>

> > @@ -1096,6 +1099,9 @@ sub report {
> >
> > push(our @report, $line);
> >
> > + if ($lazy == 1) {
> > + return 0;
> > + }
> > return 1;
> > }
> > sub report_dump {

Instead of this hunk, have:


diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 58848e3..54ec3d9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -316,7 +316,7 @@ for my $filename (@ARGV) {
}
close($FILE);
if (!process($filename)) {
- $exit = 1;
+ $exit = 1 if (!$lazy);
}
@rawlines = ();
@lines = ();


-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/