#!/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
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
{
-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);
}
$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
$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;
-.\" $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
.\" 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
.Nd man page verifier
.Sh SYNOPSIS
.Nm
-.Op Fl Fhmpvx
+.Op Fl Fhmvx
.Ar
.Sh DESCRIPTION
.Nm
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
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
.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