man pages: remove trailing whitespaces

Extended test 1173 (via the manpage-syntax.pl script) to detect and warn
for them.

Ref: #7602
Reported-by: a1346054 on github
Closes #7604
This commit is contained in:
Daniel Stenberg 2021-08-21 15:31:31 +02:00
parent 77c739909b
commit 4e53b9430c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 16 additions and 10 deletions

View file

@ -23,4 +23,10 @@ Basic man page syntax check
</command>
</client>
<verify>
<stderr>
ok
</stderr>
</verify>
</testcase>

View file

@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 2019 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@ -50,6 +50,10 @@ sub scanmanpage {
$errors++;
}
}
if($_ =~ /[ \t]+$/) {
print STDERR "$file:$line trailing whitespace\n";
$errors++;
}
$line++;
}
close(M);
@ -60,4 +64,6 @@ for my $m (@manpages) {
scanmanpage($m);
}
print STDERR "ok\n" if(!$errors);
exit $errors;