From: Joe Perches <joe@perches.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch.pl: Also suggest 'else if' when if follows brace
Date: Fri, 20 Jun 2014 13:18:56 -0700 [thread overview]
Message-ID: <1403295536.4076.8.camel@joe-AO725> (raw)
In-Reply-To: <1403294665-18344-1-git-send-email-linux@rasmusvillemoes.dk>
On Fri, 2014-06-20 at 22:04 +0200, Rasmus Villemoes wrote:
> This might help a kernel hacker think twice before blindly adding a
> newline.
Sure, fine by me.
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 010b18e..e1924eb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3601,7 +3601,7 @@ sub process {
> # if should not continue a brace
> if ($line =~ /}\s*if\b/) {
> ERROR("TRAILING_STATEMENTS",
> - "trailing statements should be on next line\n" .
> + "trailing statements should be on next line (or did you mean 'else if'?)\n" .
> $herecurr);
> }
> # case and default should not have general statements after them
prev parent reply other threads:[~2014-06-20 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 20:04 Rasmus Villemoes
2014-06-20 20:18 ` 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=1403295536.4076.8.camel@joe-AO725 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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®