mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 17:10:26 +01:00
checkpatch: detect some whitespace errors
Vim's trademark.
This commit is contained in:
parent
511709c54d
commit
66ddc92135
1 changed files with 6 additions and 0 deletions
|
|
@ -58,10 +58,12 @@ our @functions_seen;
|
|||
our $type;
|
||||
our $filename;
|
||||
our $line_no;
|
||||
our $indent;
|
||||
|
||||
sub new_hunk
|
||||
{
|
||||
$type = undef;
|
||||
$indent = "";
|
||||
}
|
||||
|
||||
sub new_file
|
||||
|
|
@ -139,6 +141,10 @@ s/\s*\/\/.*//;
|
|||
/^\s* \* / and next;
|
||||
new_hunk if $_ eq '';
|
||||
|
||||
my ($this_indent) = /^(\s*)/;
|
||||
complain ('Bad indentation') if $this_indent =~ /^$indent\t+ +/;
|
||||
$indent = $this_indent;
|
||||
|
||||
if (/^typedef*/) {
|
||||
# We expect the { on the same line as the typedef. Otherwise it
|
||||
# looks too much like a function declaration
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue