public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/checkpatch.pl: Add warning about leading contination tests
@ 2009-12-05 17:58 Joe Perches
  2009-12-06  8:35 ` Eric Dumazet
  2009-12-07 22:05 ` J. Bruce Fields
  0 siblings, 2 replies; 8+ messages in thread
From: Joe Perches @ 2009-12-05 17:58 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: David Miller, LKML, William Allen Simpson

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.*/ &&



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-08  0:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-05 17:58 [PATCH] scripts/checkpatch.pl: Add warning about leading contination tests Joe Perches
2009-12-06  8:35 ` Eric Dumazet
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox