public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: "Mike D. Day" <ncmike@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, Erez Zadok <ezk@cs.sunysb.edu>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] fix minor problems in checkpatch.pl-next
Date: Thu, 11 Oct 2007 15:32:16 +0100	[thread overview]
Message-ID: <20071011143216.GD3376@shadowen.org> (raw)
In-Reply-To: <20071011122800.GA10216@silverwood.ncultra.org>

On Thu, Oct 11, 2007 at 08:28:00AM -0400, Mike D. Day wrote:
> When forming the prefix to output error msgs in gnu gcc format, the
> lack of a type ($ or @) when referencing ARGV causes error messages.
> 
> When invoked to check source files, the linenumber was off by +3 in
> the gcc format output.
> 
> Signed-off-by: Mike D. Day <ncmike@ncultra.org>
> 
> --- checkpatch.pl-next	2007-10-11 07:28:41.000000000 -0400
> +++ /home/mdday/bin/checkpatch	2007-10-11 08:16:07.000000000 -0400
> @@ -452,7 +452,6 @@
> 
> 		my $rawline = $line;
> 
> -		$prefix = "ARGV:$linenr: " if ($emacs);
> 
> #extract the filename as it passes
> 		if ($line=~/^\+\+\+\s+(\S+)/) {
> @@ -517,6 +516,9 @@
> 		my $herecurr = "$here\n$line\n";
> 		my $hereprev = "$here\n$prevline\n$line\n";
> 
> +		$prefix = "@ARGV:$realline: " if ($emacs && $file);
> +		$prefix = "@ARGV:$linenr: " if ($emacs && !$file);
> +
> #check the patch for a signoff:
> 		if ($line =~ /^\s*signed-off-by:/i) {
> 			# This is a signoff, if ugly, so do not double 
> 			report.

Hmmm, dunno how this one ever was visible?  Some error on my part.  That
line now shows $filename rather than ARGV.  

I see you have different line numbers depending on whether this is a
file or diff.  Would you ever pass in a plain diff in emacs mode, and
what would the line number mean.

-apw

  reply	other threads:[~2007-10-11 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 12:28 [PATCH] fix minor problems in checkpatch.pl-next Mike D. Day
2007-10-11 14:32 ` Andy Whitcroft [this message]
2007-10-11 15:57   ` Mike D. Day

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=20071011143216.GD3376@shadowen.org \
    --to=apw@shadowen.org \
    --cc=ezk@cs.sunysb.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncmike@us.ibm.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