Skip to content

Commit 25b921b

Browse files
committed
Check whether all API's are included in manpage
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent 2dea2eb commit 25b921b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

helper.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ sub check_comments {
105105

106106
sub check_doc {
107107
my $fails = 0;
108+
my $man = read_file('doc/tommath.3');
108109
my $tex = read_file('doc/bn.tex');
109110
my $tmh = read_file('tommath.h');
110111
my @functions = $tmh =~ /\n\s*[a-zA-Z0-9_* ]+?(mp_[a-z0-9_]+)\s*\([^\)]+\)\s*[MP_WUR]+?;/sg;
@@ -123,6 +124,18 @@ sub check_doc {
123124
$fails++
124125
}
125126
}
127+
for my $n (sort @functions) {
128+
if ($man !~ /.BI.*$n/) {
129+
warn "[missing_man_entry_for_function] $n\n";
130+
$fails++
131+
}
132+
}
133+
for my $n (sort @macros) {
134+
if ($man !~ /.BI.*$n/) {
135+
warn "[missing_man_entry_for_macro] $n\n";
136+
$fails++
137+
}
138+
}
126139
warn( $fails > 0 ? "check_doc: FAIL $fails\n" : "check-doc: PASS\n" );
127140
return $fails;
128141
}

0 commit comments

Comments
 (0)