The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Update alignment check
@ 2012-06-13 18:50 Joe Perches
  2012-07-26  9:08 ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-06-13 18:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andy Whitcroft, LKML

Parenthesis alignment doesn't correctly check an existing line
after an inserted or modified line with an open parenthesis.

Fix it.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e5bd60f..630319a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1848,8 +1848,8 @@ sub process {
 
 			my $pos = pos_last_openparen($rest);
 			if ($pos >= 0) {
-				$line =~ /^\+([ \t]*)/;
-				my $newindent = $1;
+				$line =~ /^(\+| )([ \t]*)/;
+				my $newindent = $2;
 
 				my $goodtabindent = $oldindent .
 					"\t" x ($pos / 8) .



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

end of thread, other threads:[~2012-07-26 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 18:50 [PATCH] checkpatch: Update alignment check Joe Perches
2012-07-26  9:08 ` Paul Walmsley
2012-07-26 14:15   ` Joe Perches

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