diff options
author | 2017-05-02 17:51:32 +0000 | |
---|---|---|
committer | 2017-05-02 17:51:32 +0000 | |
commit | b38d33ad157ae9b039390166109078f3625ef704 (patch) | |
tree | 80855e21bf28c9d5fe95239997bb3a1df6067c13 | |
parent | bugfix: treat .Bd -unfilled like .Bd -literal; (diff) | |
download | wireguard-openbsd-b38d33ad157ae9b039390166109078f3625ef704.tar.xz wireguard-openbsd-b38d33ad157ae9b039390166109078f3625ef704.zip |
Remove -P (warnings about paragraph problems).
These are fully covered by mandoc -Tlint.
OK jmc@ wiz@, and also committed to pkgsrc.
-rw-r--r-- | regress/usr.bin/mdoclint/mdoclint | 35 | ||||
-rw-r--r-- | regress/usr.bin/mdoclint/mdoclint.1 | 13 |
2 files changed, 12 insertions, 36 deletions
diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint index b5733db419f..41acfd9bf02 100644 --- a/regress/usr.bin/mdoclint/mdoclint +++ b/regress/usr.bin/mdoclint/mdoclint @@ -1,7 +1,7 @@ #!/usr/bin/perl # -# $OpenBSD: mdoclint,v 1.58 2017/05/02 17:44:31 schwarze Exp $ -# $NetBSD: mdoclint,v 1.65 2017/04/25 13:17:38 wiz Exp $ +# $OpenBSD: mdoclint,v 1.59 2017/05/02 17:51:32 schwarze Exp $ +# $NetBSD: mdoclint,v 1.68 2017/05/02 13:59:10 wiz Exp $ # # Copyright (c) 2001-2017 Thomas Klausner # All rights reserved. @@ -45,19 +45,18 @@ use constant { use vars qw( $opt_a $opt_D $opt_d $opt_e $opt_F $opt_f $opt_H $opt_h $opt_l - $opt_m - $opt_n $opt_o $opt_P $opt_p $opt_r $opt_S $opt_s $opt_v $opt_w + $opt_m $opt_n $opt_o $opt_p $opt_r $opt_S $opt_s $opt_v $opt_w $opt_X $opt_x ); my $arch=`uname -m`; chomp($arch); -my $options="aDdeFfHhlmnoPprSsvwXx"; +my $options="aDdeFfHhlmnoprSsvwXx"; sub usage { - my $default = OPENBSD ? "-aDdfmnoPprSsXx" : "-aDdeflmnoPprSsXx"; + my $default = OPENBSD ? "-aDdfmnoprSsXx" : "-aDdeflmnoprSsXx"; print STDERR <<"EOF"; mdoclint: verify man page correctness @@ -74,7 +73,6 @@ usage: mdoclint [-$options] file ... -m warn about man pages that are not in mdoc(7) format -n warn about .Nd's ending in '.' -o warn about non-empty .Os strings - -P warn about paragraph problems -p warn about punctuation problems -r warn about missing RCS Id -S warn about any .Sh weirdness @@ -255,11 +253,10 @@ sub handle_options # default to all warnings if no flag is set unless ($opt_a or $opt_D or $opt_d or $opt_e or $opt_f or $opt_H or $opt_l - or $opt_m or $opt_n - or $opt_o or $opt_P or $opt_p or $opt_r + or $opt_m or $opt_n or $opt_o or $opt_p or $opt_r or $opt_S or $opt_s or $opt_X or $opt_x) { $opt_a = $opt_D = $opt_d = $opt_f = $opt_m = - $opt_n = $opt_o = $opt_P = $opt_p = $opt_r = $opt_S = + $opt_n = $opt_o = $opt_p = $opt_r = $opt_S = $opt_s = $opt_X = $opt_x = 1; $opt_e = $opt_l = 1 if NETBSD; } @@ -405,11 +402,6 @@ sub set_section_header $s->{lastsh} = $sections{$section_header}; } - if ($s->{lastline} =~ /^\.Pp/o) { - $s->warning("Paragraph problem: section header after .Pp") - if $opt_P; - } - $s->{current_section_header} = $section_header; } @@ -613,15 +605,6 @@ sub process_line if (/^\.Ed\b/o) { $s->{inliteral} = 0; } - } elsif (/^$/o) { - $s->warning("Paragraph problem: empty line -- ", - "use .Pp for paragraphs") if $opt_P; - } - if ($s->{lastline} =~ /^\.Pp/o and /^(\.Ss|\.Pp)/o) { - $s->warning("Paragraph problem: $1 after .Pp") if $opt_P; - } - if (/^\.Pp/o and $s->{lastline} =~ /^(\.S[Ssh])/o) { - $s->warning("Paragraph problem: .Pp after $1") if $opt_P; } # Check whether the list of possible errors for a function is @@ -662,10 +645,6 @@ sub finish $s->warning("Missing RCS Id") if $opt_r; } - if ($s->{lastline} =~ /^\.Pp/o) { - $s->warning("Paragraph problem: .Pp at EOF") if $opt_P; - } - end_of_section($s); # if (not ($fn =~ /$section$/)) { diff --git a/regress/usr.bin/mdoclint/mdoclint.1 b/regress/usr.bin/mdoclint/mdoclint.1 index e71bf3a6ba1..cca76a2c680 100644 --- a/regress/usr.bin/mdoclint/mdoclint.1 +++ b/regress/usr.bin/mdoclint/mdoclint.1 @@ -1,5 +1,5 @@ -.\" $OpenBSD: mdoclint.1,v 1.17 2017/04/28 14:11:01 schwarze Exp $ -.\" $NetBSD: mdoclint.1,v 1.13 2013/08/21 11:22:15 wiz Exp $ +.\" $OpenBSD: mdoclint.1,v 1.18 2017/05/02 17:51:32 schwarze Exp $ +.\" $NetBSD: mdoclint.1,v 1.15 2017/05/02 13:59:10 wiz Exp $ .\" .\" Copyright (c) 2001-2013 Thomas Klausner .\" All rights reserved. @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 28 2017 $ +.Dd $Mdocdate: May 2 2017 $ .Dt MDOCLINT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd man page verifier .Sh SYNOPSIS .Nm -.Op Fl aDdeFfHhlmnoPprSsvwXx +.Op Fl aDdeFfHhlmnoprSsvwXx .Ar .Sh DESCRIPTION .Nm @@ -41,7 +41,7 @@ is a man page verifier. It tries to automatically find as many common errors that occur when writing man pages as possible. If no flags are given, -.Fl aDdfmnoPprSsXx +.Fl aDdfmnoprSsXx is assumed (that is, everything except .Fl eFHhlvw ) . .Pp @@ -96,9 +96,6 @@ Warn when the .Os macro has an argument (it shouldn't have one at least in the base system, because on .Ox the current version is default). -.It Fl P -Warn about paragraph problems, like empty lines or .Pp macros before -section macros like .Ss and .Sh. .It Fl p Warn about possible punctuation problems at the end of macro arguments, abuse of .Ns to get punctuation directly next to a word, |