mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
checksrc: detect and warn for lack of spaces next to plus signs
This commit is contained in:
parent
6b84438d9a
commit
ca86006deb
@ -542,6 +542,19 @@ sub scanfile {
|
||||
"no space before equals sign");
|
||||
}
|
||||
|
||||
# check for plus signs without spaces next to it
|
||||
if($nostr =~ /(.*)[^+]\+[a-z0-9]/i) {
|
||||
checkwarn("PLUSNOSPACE",
|
||||
$line, length($1)+1, $file, $ol,
|
||||
"no space after plus sign");
|
||||
}
|
||||
# check for plus sign without spaces before it
|
||||
elsif($nostr =~ /(.*)[a-z0-9]\+[^+]/i) {
|
||||
checkwarn("NOSPACEPLUS",
|
||||
$line, length($1)+1, $file, $ol,
|
||||
"no space before plus sign");
|
||||
}
|
||||
|
||||
$line++;
|
||||
$prevl = $ol;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user