pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/mdoclint 1.48: remove -P option; mandoc does ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/19a285f1840c
branches: trunk
changeset: 362007:19a285f1840c
user: wiz <wiz%pkgsrc.org@localhost>
date: Tue May 02 13:59:10 2017 +0000
description:
1.48: remove -P option; mandoc does most of these checks already
and the remaining ones were recently added.
>From Ingo Schwarze.
diffstat:
textproc/mdoclint/Makefile | 4 ++--
textproc/mdoclint/files/mdoclint | 33 ++++++---------------------------
textproc/mdoclint/files/mdoclint.1 | 9 +++------
3 files changed, 11 insertions(+), 35 deletions(-)
diffs (146 lines):
diff -r 25855c86d7aa -r 19a285f1840c textproc/mdoclint/Makefile
--- a/textproc/mdoclint/Makefile Tue May 02 13:53:14 2017 +0000
+++ b/textproc/mdoclint/Makefile Tue May 02 13:59:10 2017 +0000
@@ -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 -r 25855c86d7aa -r 19a285f1840c textproc/mdoclint/files/mdoclint
--- a/textproc/mdoclint/files/mdoclint Tue May 02 13:53:14 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint Tue May 02 13:59:10 2017 +0000
@@ -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 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 @@
-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 @@
# 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 @@
$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 @@
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 @@
$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 -r 25855c86d7aa -r 19a285f1840c textproc/mdoclint/files/mdoclint.1
--- a/textproc/mdoclint/files/mdoclint.1 Tue May 02 13:53:14 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint.1 Tue May 02 13:59:10 2017 +0000
@@ -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 @@
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 @@
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,
Home |
Main Index |
Thread Index |
Old Index