mirror of
https://github.com/curl/curl.git
synced 2026-06-22 21:55:41 +03:00
checksrc: detect and warn for lack of spaces next to plus signs
This commit is contained in:
parent
6b84438d9a
commit
ca86006deb
1 changed files with 13 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue