From: Steven Rostedt <rostedt@goodmis.org>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Andy Whitcroft <apw@canonical.com>,
linux-kernel@vger.kernel.org,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [RFC] checkpatch: add option to change warning return value.
Date: Thu, 24 Mar 2011 14:23:49 -0400 [thread overview]
Message-ID: <1300991029.14261.148.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110324154010.GA863@xanatos>
On Thu, 2011-03-24 at 08:40 -0700, Sarah Sharp wrote:
> On Tue, Mar 22, 2011 at 09:41:17PM -0400, Steven Rostedt wrote:
> > On Tue, Mar 22, 2011 at 04:22:46PM -0700, Sarah Sharp wrote:
> > > > @@ -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 = ();
>
> Hmm, but isn't that going to skip returning an exit value if there's an
> error as well? I really do want it to fail if there's an error, just
> not if there's a warning.
Ah, I was a bit confused as you had report return 0, which is used by
both errors and warnings.
Would you want something like this:
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 58848e3..40cbc2f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1109,7 +1109,7 @@ sub ERROR {
}
sub WARN {
if (report("WARNING: $_[0]\n")) {
- our $clean = 0;
+ our $clean = 0 if (!$lazy);
our $cnt_warn++;
}
}
-- Steve
next prev parent reply other threads:[~2011-03-24 18:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 23:13 Sarah Sharp
2011-03-22 23:22 ` Sarah Sharp
2011-03-22 23:40 ` [RFC v2] Checkpatch: " Sarah Sharp
2011-03-23 1:41 ` [RFC] checkpatch: " Steven Rostedt
2011-03-24 15:40 ` Sarah Sharp
2011-03-24 18:23 ` Steven Rostedt [this message]
2011-03-24 22:02 ` Sarah Sharp
2011-03-23 10:07 ` Johannes Weiner
2011-03-23 18:43 ` Sarah Sharp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300991029.14261.148.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®