docs: fix line length bug in gen.pl #6438
Closed
Conversation
emilengler
added a commit
to emilengler/curl
that referenced
this pull request
Jan 11, 2021
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 curl#6438
2c0e59d
to
b398571
While thinking about it, maybe it's even better to remove the check and leave this up to checksrc |
docs/cmdline-opts/gen.pl
Outdated
if(length($opt) + length($desc) > 78) { | ||
print STDERR "WARN: the --$long line is too long\n"; | ||
if(length($opt) > 78 || length($desc) > 78 || length($bitmask) > 78) { | ||
print STDERR "WARN: some --$long lines are too long\n"; |
bagder
Jan 11, 2021
Member
I think this should spell out exactly what is too long in the error message. Maybe easiest by doing three different checks?
However, I don't think the bitmask length is the same as the others as that's a generated set of defines that this script could instead line-wrap if it turns out too long.
I think this should spell out exactly what is too long in the error message. Maybe easiest by doing three different checks?
However, I don't think the bitmask length is the same as the others as that's a generated set of defines that this script could instead line-wrap if it turns out too long.
emilengler
Jan 12, 2021
Author
Contributor
I updated it as you wanted it to some degree and removed the bitmask length check.
I updated it as you wanted it to some degree and removed the bitmask length check.
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
b398571
to
ccfdf5c
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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
.