summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-09-11 09:25:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-09-12 09:50:24 +0200
commit67ade28571da2ac688d6edeb26f3abfb4f4ae3e8 (patch)
tree192611eee793c9ca7b55e492337cc062ee6300c2 /lib
parente5743f08e7efb387bb39c0dc28f36838ece3bc1e (diff)
downloadcurl-67ade28571da2ac688d6edeb26f3abfb4f4ae3e8.tar.gz
checksrc: verify space after semicolons
Diffstat (limited to 'lib')
-rwxr-xr-xlib/checksrc.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index 3d3e51641..535e3d9f5 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -61,6 +61,7 @@ my %warnings = (
'ASSIGNWITHINCONDITION' => 'assignment within conditional expression',
'EQUALSNOSPACE' => 'equals sign without following space',
'NOSPACEEQUALS' => 'equals sign without preceeding space',
+ 'SEMINOSPACE' => 'semicolon without following space',
);
sub readwhitelist {
@@ -555,6 +556,13 @@ sub scanfile {
"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++;
$prevl = $ol;
}