summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-07-01 13:17:10 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-07-01 13:17:10 +0000
commitd0bd5589dad1dfb5355c884e573144cb3e893960 (patch)
tree5a0e00214a513f0f0598591b632b82e20fa7b31a
parentefeba2424e26e79be23969602108f4ee2ee87e51 (diff)
delete -p options, the relevant parts are now covered by mandoc;
OK jmc@
-rw-r--r--regress/usr.bin/mdoclint/mdoclint15
-rw-r--r--regress/usr.bin/mdoclint/mdoclint.114
2 files changed, 9 insertions, 20 deletions
diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint
index bcac526d67b..8d0aa5da82e 100644
--- a/regress/usr.bin/mdoclint/mdoclint
+++ b/regress/usr.bin/mdoclint/mdoclint
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $OpenBSD: mdoclint,v 1.74 2017/06/27 11:48:00 schwarze Exp $
+# $OpenBSD: mdoclint,v 1.75 2017/07/01 13:17:09 schwarze Exp $
# $NetBSD: mdoclint,v 1.77 2017/06/08 10:19:56 wiz Exp $
#
# Copyright (c) 2001-2017 Thomas Klausner
@@ -41,11 +41,11 @@ use constant {
NETBSD => 0,
};
-use vars qw($opt_F $opt_h $opt_m $opt_p $opt_v $opt_x);
+use vars qw($opt_F $opt_h $opt_m $opt_v $opt_x);
my $arch=`uname -m`;
chomp($arch);
-my $options="Fhmpvx";
+my $options="Fhmvx";
sub usage
{
@@ -55,10 +55,9 @@ usage: mdoclint [-$options] file ...
-F fix whitespace problems (asks before overwriting)
-h display this help text
-m warn about man pages that are not in mdoc(7) format
- -p warn about punctuation problems
-v verbose output
-x warn about cross-references with missing targets
-Default is -mpx if no flag is specified.
+Default is -mx if no flag is specified.
EOF
exit(0);
}
@@ -97,7 +96,7 @@ sub handle_options
$opt_h and usage();
# default to all warnings if no flag is set
- $opt_m = $opt_p = $opt_x = 1 unless $opt_m or $opt_p or $opt_x;
+ $opt_m = $opt_x = 1 unless $opt_m or $opt_x;
}
sub verify_xref
@@ -220,10 +219,6 @@ sub process_line
$s->{names}{$1.$s->{sec}} = 1;
}
}
- if (/^\./o and /Ns [\.();,\[\]\{\}:]/o) {
- $s->warning("possible Ns abuse: `$_'") if $opt_p;
- }
-
my $destruct = $_;
if ($s->{mandoc_p}) {
$destruct =~ s/\\\&([\w\.])/$1/o;
diff --git a/regress/usr.bin/mdoclint/mdoclint.1 b/regress/usr.bin/mdoclint/mdoclint.1
index ec0d7a4bf43..80001a93c73 100644
--- a/regress/usr.bin/mdoclint/mdoclint.1
+++ b/regress/usr.bin/mdoclint/mdoclint.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mdoclint.1,v 1.31 2017/06/27 11:48:00 schwarze Exp $
+.\" $OpenBSD: mdoclint.1,v 1.32 2017/07/01 13:17:09 schwarze Exp $
.\" $NetBSD: mdoclint.1,v 1.23 2017/06/08 10:19:56 wiz Exp $
.\"
.\" Copyright (c) 2001-2013 Thomas Klausner
@@ -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: June 27 2017 $
+.Dd $Mdocdate: July 1 2017 $
.Dt MDOCLINT 1
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Nd man page verifier
.Sh SYNOPSIS
.Nm
-.Op Fl Fhmpvx
+.Op Fl Fhmvx
.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 mpx
+.Fl mx
is assumed (that is, everything except
.Fl Fhv ) .
.Pp
@@ -55,8 +55,6 @@ Display usage.
Warn if man page is not in
.Xr mdoc 7
format.
-.It Fl p
-Warn about abuse of .Ns to get punctuation directly next to a word.
.It Fl v
Verbose output.
.It Fl x
@@ -88,10 +86,6 @@ utility first appeared in
.Aq Mt schwarze@OpenBSD.org
.Sh BUGS
The
-.Fl p
-flag currently produces too many bogus warnings.
-.Pp
-The
.Fl x
flag sometimes erroneously warns about xrefs to man pages for
machine-dependent drivers that are not for the architecture