diff options
author | Rich Salz <rsalz@openssl.org> | 2016-05-20 08:11:46 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-05-20 08:11:46 -0400 |
commit | 1bc74519a2a57ef8e67484ca92890fa94d3dd66f (patch) | |
tree | e6f9e69d03548ad1e73bf805957a46dec95853b1 /util | |
parent | e990ec5234d9daad66359833c40e4536d7fce499 (diff) |
Fix nits in pod files.
Add doc-nit-check to help find future issues.
Make podchecker be almost clean.
Remove trailing whitespace.
Tab expansion
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/doc-nit-check.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/util/doc-nit-check.pl b/util/doc-nit-check.pl new file mode 100644 index 0000000000..f1a7af85ec --- /dev/null +++ b/util/doc-nit-check.pl @@ -0,0 +1,42 @@ +#! /usr/bin/env perl + +require 5.10.0; +use warnings; +use strict; +use Pod::Checker; +use File::Find; + +sub check() +{ + my $errs = 0; + + my $contents = ''; + { + local $/ = undef; + open POD, $_ or die "Couldn't open $_, $!"; + $contents = <POD>; + close POD; + } + if ( $contents !~ /^=pod/ ) { + print "$_ doesn't start with =pod\n"; + return 1; + } + if ( $contents !~ /=cut\n$/ ) { + print "$_ doesn't end with =cut\n"; + return 1; + } + if ( $contents !~ /Copyright .* The OpenSSL Project Authors/ ) { + print "$_ missing copyright\n"; + return 1; + } + + $errs = podchecker($_, \*STDOUT); + $errs = 1 if $errs < 0; + return $errs; +} + +my $errs = 0; +foreach (glob('*/*.pod')) { + $errs += &check($_); +} +exit $errs; |