mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:03:37 +03:00
badwords: re-sync with curl-www, fix issues found
Also: - replace `manpage` with `man page`, add to `badwords.txt`. - badwords.pl: import `-w` feature from curl-www, syncing the two scripts fully. - badwords.txt: import missing items from curl-www, syncing the two files fully. - pyspelling.words: drop `cURL` allowed word. Closes #19468
This commit is contained in:
parent
ebc5fea64d
commit
4841e4290d
27 changed files with 109 additions and 78 deletions
|
|
@ -11,7 +11,7 @@ documentation
|
|||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
Verify the nroff of manpages
|
||||
Verify the nroff of man pages
|
||||
</name>
|
||||
|
||||
<command type="perl">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ manpages
|
|||
# Client-side
|
||||
<client>
|
||||
<name>
|
||||
symbols-in-versions and manpages agree on added-in versions
|
||||
symbols-in-versions and man pages agree on added-in versions
|
||||
</name>
|
||||
|
||||
<command type="perl">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ managen
|
|||
<client>
|
||||
|
||||
<name>
|
||||
managen makes manpage
|
||||
managen makes man page
|
||||
</name>
|
||||
|
||||
<file name="%LOGDIR/mainpage.idx">
|
||||
|
|
@ -191,7 +191,7 @@ option2.md:15:1:WARN: see-also a non-existing option: proto-default
|
|||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.\" DO NOT EDIT. Generated by the curl project managen manpage generator.
|
||||
.\" DO NOT EDIT. Generated by the curl project managen man page generator.
|
||||
.\"
|
||||
.TH curl 1 "%DATE" "curl %VERNUM" "curl Manual"
|
||||
.SH DESCRIPTION
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ fi
|
|||
echo "have_portsblocked: $have_portsblocked"
|
||||
} >> "$logfile"
|
||||
|
||||
echo "curl: have $have_curl, cURL command: |$CURL ${CURL_PARAMS[*]}|"
|
||||
echo "curl: have $have_curl, curl command: |$CURL ${CURL_PARAMS[*]}|"
|
||||
echo "ossl: have: $have_ossl, using: $using_ossl"
|
||||
echo "wolf: have: $have_wolf, using: $using_wolf"
|
||||
echo "bssl: have: $have_bssl, using: $using_bssl"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
* This test case checks whether curl_multi_remove_handle() cancels
|
||||
* asynchronous DNS resolvers without blocking where possible. Obviously, it
|
||||
* only tests whichever resolver cURL is actually built with.
|
||||
* only tests whichever resolver curl is actually built with.
|
||||
*/
|
||||
|
||||
/* We're willing to wait a very generous two seconds for the removal. This is
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@
|
|||
###########################################################################
|
||||
#
|
||||
# Scan symbols-in-version (which is verified to be correct by test 1119), then
|
||||
# verify that each option mention in there that should have its own manpage
|
||||
# verify that each option mention in there that should have its own man page
|
||||
# actually does.
|
||||
#
|
||||
# In addition, make sure that every current option to curl_easy_setopt,
|
||||
# curl_easy_getinfo and curl_multi_setopt are also mentioned in their
|
||||
# corresponding main (index) manpage.
|
||||
# corresponding main (index) man page.
|
||||
#
|
||||
# src/tool_getparam.c lists all options curl can parse
|
||||
# docs/curl.1 documents all command line options
|
||||
|
|
@ -229,8 +229,8 @@ while(<$r>) {
|
|||
close($r);
|
||||
|
||||
#########################################################################
|
||||
# parse the curl.1 manpage, extract all documented command line options
|
||||
# The manpage may or may not be rebuilt, so check both possible locations
|
||||
# parse the curl.1 man page, extract all documented command line options
|
||||
# The man page may or may not be rebuilt, so check both possible locations
|
||||
open($r, "<", "$buildroot/docs/cmdline-opts/curl.1") || open($r, "<", "$root/docs/cmdline-opts/curl.1") ||
|
||||
die "failed getting curl.1";
|
||||
my @manpage; # store all parsed parameters
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#
|
||||
###########################################################################
|
||||
#
|
||||
# scan manpages to find basic syntactic problems such as unbalanced \f
|
||||
# codes or references to non-existing curl manpages.
|
||||
# scan man pages to find basic syntactic problems such as unbalanced \f
|
||||
# codes or references to non-existing curl man pages.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
|
@ -81,7 +81,7 @@ sub file {
|
|||
my $man = "$1.3";
|
||||
$man =~ s/\\//g; # cut off backslashes
|
||||
if(!manpresent($man)) {
|
||||
print "error: $f:$line: referring to non-existing manpage $man\n";
|
||||
print "error: $f:$line: referring to non-existing man page $man\n";
|
||||
$errors++;
|
||||
}
|
||||
if($pre ne "I") {
|
||||
|
|
@ -100,7 +100,7 @@ sub file {
|
|||
my $man = "$1.3";
|
||||
$man =~ s/\\//g; # cut off backslashes
|
||||
if(!manpresent($man)) {
|
||||
print "error: $f:$line: referring to non-existing manpage $man\n";
|
||||
print "error: $f:$line: referring to non-existing man page $man\n";
|
||||
$errors++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#
|
||||
###########################################################################
|
||||
#
|
||||
# Scan manpage(s) and detect some simple and yet common formatting mistakes.
|
||||
# Scan man page(s) and detect some simple and yet common formatting mistakes.
|
||||
#
|
||||
# Output all deviances to stderr.
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ sub scanmanpage {
|
|||
open(my $m, "<", "$file") ||
|
||||
die "test1173.pl could not open $file";
|
||||
if($file =~ /[\/\\](CURL|curl_)([^\/\\]*).3/) {
|
||||
# This is a manpage for libcurl. It requires an example unless it's
|
||||
# This is a man page for libcurl. It requires an example unless it's
|
||||
# considered deprecated.
|
||||
$reqex = 1 unless defined $deprecated{'CURL'.$2};
|
||||
if($1 eq "CURL") {
|
||||
|
|
@ -159,12 +159,12 @@ sub scanmanpage {
|
|||
while(<$m>) {
|
||||
chomp;
|
||||
if($_ =~ /^.so /) {
|
||||
# this manpage is just a referral
|
||||
# this man page is just a referral
|
||||
close($m);
|
||||
return;
|
||||
}
|
||||
if(($_ =~ /^\.SH SYNOPSIS/i) && ($reqex)) {
|
||||
# this is for libcurl manpage SYNOPSIS checks
|
||||
# this is for libcurl man page SYNOPSIS checks
|
||||
$insynop = 1;
|
||||
$inexample = 0;
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ sub scanmanpage {
|
|||
|
||||
if($optpage && $SH && ($SH !~ /^(SYNOPSIS|EXAMPLE|NAME|SEE ALSO)/i) &&
|
||||
($_ =~ /(.*)(CURL(OPT_|MOPT_|INFO_|SHOPT_)[A-Z0-9_]*)/)) {
|
||||
# an option with its own manpage, check that it is tagged
|
||||
# an option with its own man page, check that it is tagged
|
||||
# for linking
|
||||
my ($pref, $symbol) = ($1, $2);
|
||||
if($deprecated{$symbol}) {
|
||||
|
|
@ -318,7 +318,7 @@ sub scanmanpage {
|
|||
}
|
||||
|
||||
if($shcount < 3) {
|
||||
print STDERR "$file:$line too few manpage sections!\n";
|
||||
print STDERR "$file:$line too few man page sections!\n";
|
||||
$errors++;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
###########################################################################
|
||||
#
|
||||
# Check that the deprecated statuses of functions and enum values in header
|
||||
# files, manpages and symbols-in-versions are in sync.
|
||||
# files, man pages and symbols-in-versions are in sync.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
|
@ -48,8 +48,8 @@ my $errcode = 0;
|
|||
# x.yy.z Deprecated in version x.yy.z
|
||||
my %syminver; # Symbols-in-versions deprecations.
|
||||
my %hdr; # Public header files deprecations.
|
||||
my %funcman; # Function manpages deprecations.
|
||||
my %optman; # Option manpages deprecations.
|
||||
my %funcman; # Function man pages deprecations.
|
||||
my %optman; # Option man pages deprecations.
|
||||
|
||||
|
||||
# Scan header file for public function and enum values. Flag them with
|
||||
|
|
@ -144,7 +144,7 @@ sub scan_header {
|
|||
close $h;
|
||||
}
|
||||
|
||||
# Scan function manpage for options.
|
||||
# Scan function man page for options.
|
||||
# Each option has to be declared as ".IP <option>" where <option> starts with
|
||||
# the prefix. Flag each option with its deprecation version, if some.
|
||||
sub scan_man_for_opts {
|
||||
|
|
@ -183,7 +183,7 @@ sub scan_man_for_opts {
|
|||
close $m;
|
||||
}
|
||||
|
||||
# Scan manpage for deprecation in DESCRIPTION and/or AVAILABILITY sections.
|
||||
# Scan man page for deprecation in DESCRIPTION and/or AVAILABILITY sections.
|
||||
sub scan_man_page {
|
||||
my ($path, $sym, $table)=@_;
|
||||
my $version = "X";
|
||||
|
|
@ -194,7 +194,7 @@ sub scan_man_page {
|
|||
|
||||
while(<$fh>) {
|
||||
if($_ =~ /\.so\s+man3\/(.*\.3\b)/) {
|
||||
# Handle manpage inclusion.
|
||||
# Handle man page inclusion.
|
||||
scan_man_page(dirname($path) . "/$1", $sym, $table);
|
||||
$version = exists($$table{$sym})? $$table{$sym}: $version;
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ sub scan_man_page {
|
|||
# Flag deprecation status.
|
||||
if($version ne "X" && $version ne "?") {
|
||||
if($1 && $1 ne $version) {
|
||||
print "error: $sym manpage lists unmatching deprecation versions $version and $1\n";
|
||||
print "error: $sym man page lists unmatching deprecation versions $version and $1\n";
|
||||
$errcode++;
|
||||
}
|
||||
}
|
||||
|
|
@ -269,18 +269,18 @@ for(@hfiles) {
|
|||
scan_header("$incdir/$_");
|
||||
}
|
||||
|
||||
# Get function statuses from manpages.
|
||||
# Get function statuses from man pages.
|
||||
foreach my $sym (keys %hdr) {
|
||||
if($sym =~/^(?:curl|curlx)_\w/) {
|
||||
scan_man_page("$libdocdir/$sym.3", $sym, \%funcman);
|
||||
}
|
||||
}
|
||||
|
||||
# Get options from function manpages.
|
||||
# Get options from function man pages.
|
||||
scan_man_for_opts("$libdocdir/curl_easy_setopt.3", "CURLOPT");
|
||||
scan_man_for_opts("$libdocdir/curl_easy_getinfo.3", "CURLINFO");
|
||||
|
||||
# Get deprecation status from option manpages.
|
||||
# Get deprecation status from option man pages.
|
||||
foreach my $sym (keys %syminver) {
|
||||
if($sym =~ /^(?:CURLOPT|CURLINFO)_\w+$/) {
|
||||
scan_man_page("$libdocdir/opts/$sym.3", $sym, \%optman);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ scanmanpage($manpge);
|
|||
print "Result\n";
|
||||
for my $h (sort @hnames) {
|
||||
if(!$manfrom{$h}) {
|
||||
printf "$h from %s, not in manpage\n", $wherefrom{$h};
|
||||
printf "$h from %s, not in man page\n", $wherefrom{$h};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue