summaryrefslogtreecommitdiff
path: root/textproc/mdoclint/files
diff options
context:
space:
mode:
authorwiz <wiz>2017-05-02 13:59:10 +0000
committerwiz <wiz>2017-05-02 13:59:10 +0000
commit4474f804b0998b97648110242656cccafe55e83f (patch)
tree0b80079f05620a6bc023188188573de9e2f88d90 /textproc/mdoclint/files
parent427d153ce58c128c28037b6d898394935cb36185 (diff)
downloadpkgsrc-4474f804b0998b97648110242656cccafe55e83f.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/mdoclint/files')
-rwxr-xr-xtextproc/mdoclint/files/mdoclint33
-rwxr-xr-xtextproc/mdoclint/files/mdoclint.19
2 files changed, 9 insertions, 33 deletions
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,