MDOCLINT(1)

NAME
mdoclint - man page verifier

SYNOPSIS
mdoclint [-AaDdeFfHhlmnoPprSsvwXx] file ...

DESCRIPTION
mdoclint 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, -AaDdeflmnoPprSsXx is assumed (that is, everything except -FHhvw).

The options are as follows:
-A  Warn if the “.An” macro (author) markup is not used in the AUTHORS section.
-a  Warn about some possible problems in the SEE ALSO section, like incorrect order (correct order: first by section numbers, then by name), or incorrect or superfluous punctuation between or after the cross-references.
-D  Warn about bad casing and architectures in the .Dt macro.
-d  Warn about bad date strings (in the .Dd macro).
-e  Warn about unsorted errors (for functions).
-F  Fix whitespace problems (see also -s).
-f  Warn about possible .Fn abuse; its arguments should be put in ‘"’ separately, not together and separated by commas. Those will be automatically added by mdoc.
-H  Show warnings for characters that might generate problems in HTML output: ‘’, ‘’, and ‘’. Replace a pair of angle quotes with the .Aq macro. Otherwise, the replacements are “\*[Lt]”, “\*[Gt]”, and “\*[Am]”. This option is off by default, as these characters no longer pose any problems.
-h  Display usage.
-l  Warn about unknown libraries used as arguments to Lb.
-m  Warn if man page is not in mdoc(7) format.
-n  Warn when the .Nd macro's argument ends in a dot, that is ‘’..
-o  Warn when the .Os macro has an argument (it shouldn't have one at least in the base system, because on NetBSD the current version is default).
-P  Warn about paragraph problems, like empty lines or .Pp macros before section macros like .Ss and .Sh.
-p  Warn about possible punctuation problems at the end of macro arguments, abuse of .Ns to get punctuation directly next to a word, and sentences not starting on a new line.
-r  Warn about missing RCS Id.
-S  Warn about any unknown sections or about a section that comes in the wrong order (see mdoc(7)).
-s  Warn about superfluous whitespace at the end of line.
-v  Verbose output.
-w  Display the section name, in addition to the relevant line number, in warnings.
-X  Warn about explicit mentions of the words “FreeBSD”, “NetBSD”, “DragonFlyBSD”, and “OpenBSD”, which should be replaced by .Fx, .Nx, .Dx, and .Ox respectively. Also notices occurrences of “.Bx Free”, “.Bx Net”, “.Bx DragonFly”, and “.Bx Open”, for which the same applies.
-x  Warn about cross-references whose target is missing, cross-references to itself, or plain bogus cross-references.

    For “.Xr name X”, the following files are checked: /usr/share/man/manX/name.X, /usr/share/man/manX/`uname -m`/name.X, /usr/X11R7/man/manX/name.X, and ./name.X.

SEE ALSO
mdoc(7), mdoc.samples(7)

AUTHORS
Thomas Klausner <wiz@netbsd.org> Marc Espie <espie@openbsd.org>

BUGS
The -o and -p flags currently produce too many bogus warnings.

The -x flag sometimes erroneously warns about xrefs to man pages for machine-dependent drivers that are not for the architecture mdoclint is running on.