lkml.org 
[lkml]   [2012]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] checkpatch: Update alignment check
From
Date
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) .



\
 
 \ /
  Last update: 2012-06-13 21:21    [W:0.060 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site