mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
Add wordlist from man7.org
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/10023)
This commit is contained in:
parent
65c76cd2c9
commit
60a7817cac
@ -349,6 +349,59 @@ sub functionname_check {
|
||||
# with a variable part (typically marked up as B<foo_I<TYPE>_bar>
|
||||
}
|
||||
|
||||
# This is from http://man7.org/linux/man-pages/man7/man-pages.7.html
|
||||
my %preferred_words = (
|
||||
'bitmask' => 'bit mask',
|
||||
'builtin' => 'built-in',
|
||||
#'epoch' => 'Epoch', # handled specially, below
|
||||
'file name' => 'filename',
|
||||
'file system' => 'filesystem',
|
||||
'host name' => 'hostname',
|
||||
'i-node' => 'inode',
|
||||
'lower case' => 'lowercase',
|
||||
'lower-case' => 'lowercase',
|
||||
'non-zero' => 'nonzero',
|
||||
'path name' => 'pathname',
|
||||
'pseudo-terminal' => 'pseudoterminal',
|
||||
'reserved port' => 'privileged port',
|
||||
'system port' => 'privileged port',
|
||||
'realtime' => 'real-time',
|
||||
'real time' => 'real-time',
|
||||
'runtime' => 'run time',
|
||||
'saved group ID'=> 'saved set-group-ID',
|
||||
'saved set-GID' => 'saved set-group-ID',
|
||||
'saved user ID' => 'saved set-user-ID',
|
||||
'saved set-UID' => 'saved set-user-ID',
|
||||
'set-GID' => 'set-group-ID',
|
||||
'setgid' => 'set-group-ID',
|
||||
'set-UID' => 'set-user-ID',
|
||||
'setuid' => 'set-user-ID',
|
||||
'super user' => 'superuser',
|
||||
'super-user' => 'superuser',
|
||||
'super block' => 'superblock',
|
||||
'super-block' => 'superblock',
|
||||
'time stamp' => 'timestamp',
|
||||
'time zone' => 'timezone',
|
||||
'upper case' => 'uppercase',
|
||||
'upper-case' => 'uppercase',
|
||||
'useable' => 'usable',
|
||||
'userspace' => 'user space',
|
||||
'user name' => 'username',
|
||||
'zeroes' => 'zeros'
|
||||
);
|
||||
|
||||
sub wording {
|
||||
my $id = shift;
|
||||
my $contents = shift;
|
||||
|
||||
foreach my $k ( keys %preferred_words ) {
|
||||
err($id, "found '$k' should use '$preferred_words{$k}'")
|
||||
if $contents =~ /\b\Q$k\E\b/i;
|
||||
}
|
||||
err($id, "found 'epoch' should use 'Epoch'")
|
||||
if $contents =~ /\bepoch\b/;
|
||||
}
|
||||
|
||||
sub check {
|
||||
my $filename = shift;
|
||||
my $dirname = basename(dirname($filename));
|
||||
@ -380,6 +433,8 @@ sub check {
|
||||
}
|
||||
}
|
||||
|
||||
wording($id, $contents);
|
||||
|
||||
err($id, "doesn't start with =pod")
|
||||
if $contents !~ /^=pod/;
|
||||
err($id, "doesn't end with =cut")
|
||||
|
Loading…
x
Reference in New Issue
Block a user