1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

nroff-scan.pl: verify that references are made with \fI

This commit is contained in:
Daniel Stenberg 2016-05-02 09:09:16 +02:00
parent dac8ce9558
commit 1135340214

View File

@ -64,7 +64,7 @@ sub file {
my ($pre, $str, $post)=($1, $2, $3); my ($pre, $str, $post)=($1, $2, $3);
if($post ne "P") { if($post ne "P") {
print STDERR "error: $f:$line: missing \\fP after $str\n"; print STDERR "error: $f:$line: missing \\fP after $str\n";
$errrors++; $errors++;
} }
if($str =~ /((libcurl|curl)([^ ]*))\(3\)/i) { if($str =~ /((libcurl|curl)([^ ]*))\(3\)/i) {
my $man = "$1.3"; my $man = "$1.3";
@ -72,6 +72,10 @@ sub file {
print STDERR "error: $f:$line: refering to non-existing man page $man\n"; print STDERR "error: $f:$line: refering to non-existing man page $man\n";
$errors++; $errors++;
} }
if($pre ne "I") {
print STDERR "error: $f:$line: use \\fI before $str\n";
$errors++;
}
} }
} }
if($l =~ /(curl([^ ]*)\(3\))/i) { if($l =~ /(curl([^ ]*)\(3\))/i) {
@ -97,4 +101,4 @@ foreach my $f (@f) {
file($f); file($f);
} }
exit $errors?1:0; exit $errors?1:0;