mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: trix@redhat.com, apw@canonical.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: add a fixer for missing newline at eof
Date: Wed, 14 Oct 2020 17:42:40 -0700	[thread overview]
Message-ID: <7983b5dcb7f589e31fb954cfc1472a93244984fb.camel@perches.com> (raw)
In-Reply-To: <20201014211540.15732-1-trix@redhat.com>

On Wed, 2020-10-14 at 14:15 -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> Remove the trailing error message from the fixed lines

Hi Tom.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3393,8 +3393,11 @@ sub process {
>  
>  # check for adding lines without a newline.
>  		if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
> -			WARN("MISSING_EOF_NEWLINE",
> -			     "adding a line without newline at end of file\n" . $herecurr);
> +			if (WARN("MISSING_EOF_NEWLINE",
> +			         "adding a line without newline at end of file\n" . $herecurr) &&
> +			    $fix) {
> +			    fix_delete_line($fixlinenr+1, "No newline at end of file");

This is misindented, the 4 spaces before fix_delete_line
should be a tab, otherwise this looks fine, thanks.



      reply	other threads:[~2020-10-15  0:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 21:15 trix
2020-10-15  0:42 ` Joe Perches [this message]

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=7983b5dcb7f589e31fb954cfc1472a93244984fb.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trix@redhat.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®