mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 05:28:33 +02:00
contrib/checkpatch: check some more whitespace trouble
This commit is contained in:
parent
1d57aefa41
commit
587f006690
1 changed files with 9 additions and 1 deletions
|
|
@ -135,7 +135,15 @@ complain ("Don't use space inside elvis operator ?:") if $line =~ /\?[\t ]+:/;
|
|||
|
||||
new_hunk if $_ eq '';
|
||||
my ($this_indent) = /^(\s*)/;
|
||||
complain ("Bad indentation") if defined $indent and $this_indent =~ /^$indent\t+ +/;
|
||||
if (defined $indent) {
|
||||
my $this_tabs_before_spaces = length $1 if $this_indent =~ /^(\t*) +/;
|
||||
my $tabs_before_spaces = length $1 if $indent =~ /^(\t*) +/;
|
||||
|
||||
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);
|
||||
}
|
||||
$indent = $this_indent;
|
||||
|
||||
# Further on we process stuff without comments.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue