summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-06-25 10:13:49 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-06-25 20:27:39 +0200
commitda312e62207476624f21efe7be75bcc13e7397b9 (patch)
tree63f99d53f823c8f51b5bbb8ca08595c3b7b2fa4a
parent5ff19ea8d24e6b3751c4356727664ea51f879010 (diff)
downloadNetworkManager-da312e62207476624f21efe7be75bcc13e7397b9.tar.gz
contrib/checkpatch: be a bit stricter about whitespace
In continations (that use spaces for alignment), don't allow the number of leading tabs to change. Previously only removal of tabs was disallowed, but addition doesn't make sense either, as only spaces should be used for further alignemnt. This catches situations like this: |<-tab->all_work_and_no_play (makes, |<-tab-> jack, |<-tab-><-tab-> a dull boy);
-rwxr-xr-xcontrib/scripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl
index 65996eca7f..78ac3cb305 100755
--- a/contrib/scripts/checkpatch.pl
+++ b/contrib/scripts/checkpatch.pl
@@ -204,7 +204,7 @@ if (defined $indent) {
complain ("Bad indentation")
if $this_indent =~ /^$indent\t+ +/
or (defined $tabs_before_spaces and defined $this_tabs_before_spaces
- and $this_tabs_before_spaces < $tabs_before_spaces);
+ and $this_tabs_before_spaces != $tabs_before_spaces);
}
$indent = $this_indent;