1 .\" $OpenBSD: mdoclint.1,v 1.7 2009/04/13 19:06:38 jmc Exp $
2 .\" $NetBSD: mdoclint.1,v 1.3 2003/05/09 09:22:05 wiz Exp $
4 .\" Copyright (c) 2001-2008 Thomas Klausner
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR, THOMAS KLAUSNER,
17 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 .\" POSSIBILITY OF SUCH DAMAGE.
28 .Dd $Mdocdate: April 13 2009 $
36 .Op Fl aDdeFfHhmnoPprSsvwXx
40 is a man page verifier.
41 It tries to automatically find as many common
42 errors that occur when writing man pages as possible.
43 If no flags are given,
45 is assumed (that is, everything except
48 The options are as follows:
51 Warn about some possible problems in the
53 section, like incorrect order (correct order: first by section
54 numbers, then by name), or incorrect or superfluous punctuation
55 between or after the cross-references.
57 Warn about bad casing and architectures in the .Dt macro.
59 Warn about .Dd strings
63 Warn about unsorted errors (for functions).
65 Fix whitespace problems (see also
68 Warn about possible .Fn abuse; its arguments should be put in
70 separately, not together and separated by commas.
71 Those will be automatically added by mdoc.
73 Show warnings for characters that might generate problems in
78 Replace a pair of angle quotes with the .Aq macro.
79 Otherwise, the replacements are
86 Warn if man page is not in
90 Warn when the .Nd macro's argument ends in a dot, that is
93 Warn when the .Os macro has an argument (it shouldn't have one at
94 least in the base system, because on
96 the current version is default).
98 Warn about paragraph problems, like empty lines or .Pp macros before
99 section macros like .Ss and .Sh.
101 Warn about possible punctuation problems at the end of macro arguments,
102 abuse of .Ns to get punctuation directly next to a word,
103 and sentences not starting on a new line.
105 Warn about missing RCS Id.
107 Warn about any unknown sections or about a section that comes in the
111 Warn about superfluous whitespace at the end of line.
115 Display the section name,
116 in addition to the relevant line number,
119 Warn about explicit mentions of the words
124 which should be replaced by .Fx, .Nx, and .Ox respectively.
125 Also notices occurrences of
130 for which the same applies.
132 Warn about cross-references whose target is missing, cross-references
133 to itself, or plain bogus cross-references.
137 the following files are checked:
138 .Pa /usr/share/man/catX/name.0 ,
139 .Pa /usr/share/man/catX/`uname -m`/name.0 ,
141 .Pa /usr/X11R6/man/catX/name.0 ,
143 .Pa /usr/X11R6/man/manX/name.X .
151 utility first appeared in
157 .Aq espie@openbsd.org
163 flags currently produce too many bogus warnings.
167 flag sometimes erroneously warns about xrefs to man pages for
168 machine-dependent drivers that are not for the architecture