pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/mdoclint
Module Name: pkgsrc
Committed By: wiz
Date: Tue May 2 13:59:10 UTC 2017
Modified Files:
pkgsrc/textproc/mdoclint: Makefile
pkgsrc/textproc/mdoclint/files: mdoclint mdoclint.1
Log Message:
1.48: remove -P option; mandoc does most of these checks already
and the remaining ones were recently added.
>From Ingo Schwarze.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 pkgsrc/textproc/mdoclint/Makefile
cvs rdiff -u -r1.67 -r1.68 pkgsrc/textproc/mdoclint/files/mdoclint
cvs rdiff -u -r1.14 -r1.15 pkgsrc/textproc/mdoclint/files/mdoclint.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/mdoclint/Makefile
diff -u pkgsrc/textproc/mdoclint/Makefile:1.58 pkgsrc/textproc/mdoclint/Makefile:1.59
--- pkgsrc/textproc/mdoclint/Makefile:1.58 Fri Apr 28 13:43:57 2017
+++ pkgsrc/textproc/mdoclint/Makefile Tue May 2 13:59:10 2017
@@ -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
Index: pkgsrc/textproc/mdoclint/files/mdoclint
diff -u pkgsrc/textproc/mdoclint/files/mdoclint:1.67 pkgsrc/textproc/mdoclint/files/mdoclint:1.68
--- pkgsrc/textproc/mdoclint/files/mdoclint:1.67 Tue May 2 13:53:14 2017
+++ pkgsrc/textproc/mdoclint/files/mdoclint Tue May 2 13:59:10 2017
@@ -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$/)) {
Index: pkgsrc/textproc/mdoclint/files/mdoclint.1
diff -u pkgsrc/textproc/mdoclint/files/mdoclint.1:1.14 pkgsrc/textproc/mdoclint/files/mdoclint.1:1.15
--- pkgsrc/textproc/mdoclint/files/mdoclint.1:1.14 Fri Apr 28 13:43:57 2017
+++ pkgsrc/textproc/mdoclint/files/mdoclint.1 Tue May 2 13:59:10 2017
@@ -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
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