diff options
author | wiz <wiz@pkgsrc.org> | 2017-05-02 13:59:10 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2017-05-02 13:59:10 +0000 |
commit | 30be9687af65dab66465f0bb6c0fe92238f50763 (patch) | |
tree | fe2e67d0b9f154349f46aa338110a7261b4eff75 /textproc | |
parent | a3dfd2ec0205c109e7c2a39d810ecb13640002b7 (diff) | |
download | pkgsrc-30be9687af65dab66465f0bb6c0fe92238f50763.tar.gz |
1.48: remove -P option; mandoc does most of these checks already
and the remaining ones were recently added.
From Ingo Schwarze.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/mdoclint/Makefile | 4 | ||||
-rwxr-xr-x | textproc/mdoclint/files/mdoclint | 33 | ||||
-rwxr-xr-x | textproc/mdoclint/files/mdoclint.1 | 9 |
3 files changed, 11 insertions, 35 deletions
diff --git a/textproc/mdoclint/Makefile b/textproc/mdoclint/Makefile index 91271adec4c..948d9d31201 100644 --- a/textproc/mdoclint/Makefile +++ b/textproc/mdoclint/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.58 2017/04/28 13:43:57 wiz Exp $ +# $NetBSD: Makefile,v 1.59 2017/05/02 13:59:10 wiz Exp $ -DISTNAME= mdoclint-1.47 +DISTNAME= mdoclint-1.48 CATEGORIES= textproc MASTER_SITES= # none DISTFILES= # none diff --git a/textproc/mdoclint/files/mdoclint b/textproc/mdoclint/files/mdoclint index a1d33f5fbee..94d88ccf190 100755 --- a/textproc/mdoclint/files/mdoclint +++ b/textproc/mdoclint/files/mdoclint @@ -1,7 +1,7 @@ #!@PERL5@ # # $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $ -# $NetBSD: mdoclint,v 1.67 2017/05/02 13:53:14 wiz 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/textproc/mdoclint/files/mdoclint.1 b/textproc/mdoclint/files/mdoclint.1 index a86d198a4db..a3426ae4d03 100755 --- a/textproc/mdoclint/files/mdoclint.1 +++ b/textproc/mdoclint/files/mdoclint.1 @@ -1,5 +1,5 @@ .\" $OpenBSD: mdoclint.1,v 1.7 2009/04/13 19:06:38 jmc Exp $ -.\" $NetBSD: mdoclint.1,v 1.14 2017/04/28 13:43:57 wiz Exp $ +.\" $NetBSD: mdoclint.1,v 1.15 2017/05/02 13:59:10 wiz Exp $ .\" .\" Copyright (c) 2001-2013 Thomas Klausner .\" All rights reserved. @@ -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 aDdeflmnoPprSsXx +.Fl aDdeflmnoprSsXx is assumed (that is, everything except .Fl FHhvw ) . .Pp @@ -98,9 +98,6 @@ Warn when the .Os macro has an argument (it shouldn't have one at least in the base system, because on .Nx 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, |