summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-10-18 10:46:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-10-18 23:52:30 +0200
commit3da8b4dabf712f6fd709334955fce3694df94e9e (patch)
tree995d067511fff5b60e1ccb63cb3a41f3aac68449
parentbffe90cf2e33ab81fcf0e58bdf1bff2e712c0dde (diff)
downloadcurl-3da8b4dabf712f6fd709334955fce3694df94e9e.tar.gz
checksrc: improve the SPACESEMICOLON error message
and adjust the MULTISPACE one to use plural Closes #7866
-rwxr-xr-xlib/checksrc.pl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index bb3495f79..8f98a99ab 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -547,7 +547,6 @@ sub scanfile {
}
elsif($even && $postparen &&
($postparen !~ /^ *$/) && ($postparen !~ /^ *[,{&|\\]+/)) {
- print STDERR "5: '$postparen'\n";
checkwarn("ONELINECONDITION",
$line, length($l)-length($postparen), $file, $l,
"conditional block on the same line");
@@ -648,7 +647,7 @@ sub scanfile {
# check for space before the semicolon last in a line
if($l =~ /^(.*[^ ].*) ;$/) {
checkwarn("SPACESEMICOLON",
- $line, length($1), $file, $ol, "space before last semicolon");
+ $line, length($1), $file, $ol, "no space before semicolon");
}
# scan for use of banned functions
@@ -706,7 +705,6 @@ sub scanfile {
# more steps, if not a cpp line
if(!$prevp && ($prevl =~ /^( *)((if|while|for)\(.*\{|else)\z/)) {
my $first = length($1);
-
# this line has some character besides spaces
if($l =~ /^( *)[^ ]/) {
my $second = length($1);
@@ -799,9 +797,7 @@ sub scanfile {
$nostr =~ /^(.*(\S)) + [{?]/i) {
checkwarn("MULTISPACE",
$line, length($1)+1, $file, $ol,
- "multiple space");
- print STDERR "L: $l\n";
- print STDERR "nostr: $nostr\n";
+ "multiple spaces");
}
preproc:
$line++;