From: Eric Dumazet <eric.dumazet@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>,
David Miller <davem@davemloft.net>,
LKML <linux-kernel@vger.kernel.org>,
William Allen Simpson <william.allen.simpson@gmail.com>
Subject: Re: [PATCH] scripts/checkpatch.pl: Add warning about leading contination tests
Date: Sun, 06 Dec 2009 09:35:04 +0100 [thread overview]
Message-ID: <4B1B6CB8.7000107@gmail.com> (raw)
In-Reply-To: <1260035884.11126.58.camel@Joe-Laptop.home>
Joe Perches a écrit :
> Signed-off-by: Joe Perches <joe@perches.com>
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index bc4114f..c35933a 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2064,6 +2064,11 @@ sub process {
> CHK("multiple assignments should be avoided\n" . $herecurr);
> }
>
> +# Check use of leading logical continuation tests
> + if ($line =~ /^.\s*(\|\||&&)/) {
> + WARN("Continuation logic should be at end of previous line\n" . $herecurr);
> + }
> +
> ## # check for multiple declarations, allowing for a function declaration
> ## # continuation.
> ## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&
>
>
Fine with me, but please add relevant info in Documentation/CodingStyle ?
next prev parent reply other threads:[~2009-12-06 8:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 17:58 [PATCH] scripts/checkpatch.pl: Add warning about leading contination tests Joe Perches
2009-12-06 8:35 ` Eric Dumazet [this message]
2009-12-06 12:13 ` Jean Delvare
2009-12-06 17:46 ` Joe Perches
2009-12-06 18:53 ` Jean Delvare
2009-12-06 19:08 ` Joe Perches
2009-12-07 22:05 ` J. Bruce Fields
2009-12-08 0:08 ` William Allen Simpson
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=4B1B6CB8.7000107@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=apw@canonical.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=william.allen.simpson@gmail.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