summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Engler <me@emilengler.com>2021-01-11 20:27:58 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-12 08:06:54 +0100
commit324cf1d2ee772624ad1e93f36ca9ddd40acdba43 (patch)
tree5b66f459a7e76b0e7c2e4f8cc995f8c7201a8fb9
parentefa5b16d38cd76f26c9ce846d0765d4f4b809b37 (diff)
downloadcurl-324cf1d2ee772624ad1e93f36ca9ddd40acdba43.tar.gz
docs: fix line length bug in gen.pl
The script warns if the length of $opt and $desc is > 78. However, these two variables are on totally separate lines so the check makes no sense. Also the $bitmask field is totally forgotten. Currently this leads to two warnings within `--resolve` and `--aws-sigv4`. Closes #6438
-rwxr-xr-xdocs/cmdline-opts/gen.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl
index ff358514a..1cd4a050e 100755
--- a/docs/cmdline-opts/gen.pl
+++ b/docs/cmdline-opts/gen.pl
@@ -369,8 +369,11 @@ sub listhelp {
my $line = sprintf " {\"%s\",\n \"%s\",\n %s},\n", $opt, $desc, $bitmask;
- if(length($opt) + length($desc) > 78) {
- print STDERR "WARN: the --$long line is too long\n";
+ if(length($opt) > 78) {
+ print STDERR "WARN: the --$long name is too long\n";
+ }
+ else if(length($desc) > 78) {
+ print STDERR "WARN: the --$long description is too long\n";
}
print $line;
}