mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
checksrc: verify space after semicolons
This commit is contained in:
parent
e5743f08e7
commit
67ade28571
@ -61,6 +61,7 @@ my %warnings = (
|
|||||||
'ASSIGNWITHINCONDITION' => 'assignment within conditional expression',
|
'ASSIGNWITHINCONDITION' => 'assignment within conditional expression',
|
||||||
'EQUALSNOSPACE' => 'equals sign without following space',
|
'EQUALSNOSPACE' => 'equals sign without following space',
|
||||||
'NOSPACEEQUALS' => 'equals sign without preceeding space',
|
'NOSPACEEQUALS' => 'equals sign without preceeding space',
|
||||||
|
'SEMINOSPACE' => 'semicolon without following space',
|
||||||
);
|
);
|
||||||
|
|
||||||
sub readwhitelist {
|
sub readwhitelist {
|
||||||
@ -555,6 +556,13 @@ sub scanfile {
|
|||||||
"no space before plus sign");
|
"no space before plus sign");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check for semicolons without space next to it
|
||||||
|
if($nostr =~ /(.*)\;[a-z0-9]/i) {
|
||||||
|
checkwarn("SEMINOSPACE",
|
||||||
|
$line, length($1)+1, $file, $ol,
|
||||||
|
"no space after semilcolon");
|
||||||
|
}
|
||||||
|
|
||||||
$line++;
|
$line++;
|
||||||
$prevl = $ol;
|
$prevl = $ol;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user