]> git.cameronkatri.com Git - mandoc.git/blob - mdoclint.1
Memory-corruption fix.
[mandoc.git] / mdoclint.1
1 .\" $Id: mdoclint.1,v 1.1 2009/02/23 13:06:18 kristaps Exp $
2 .\"
3 .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the
7 .\" above copyright notice and this permission notice appear in all
8 .\" copies.
9 .\"
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 .\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 .\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 .\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 .\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 .\" PERFORMANCE OF THIS SOFTWARE.
18 .\"
19 .Dd $Mdocdate: February 23 2009 $
20 .Dt mdoclint 1
21 .Os
22 .\" SECTION
23 .Sh NAME
24 .Nm mdoclint
25 .Nd mdoc macro compiler
26 .\" SECTION
27 .Sh SYNOPSIS
28 .Nm mdoclint
29 .Op Fl v
30 .Op Fl W Ns Ar err...
31 .Op Ar infile
32 .\" SECTION
33 .Sh DESCRIPTION
34 The
35 .Nm
36 utility parses a BSD
37 .Dq mdoc
38 manual pages and validates its syntax tree. The arguments are as
39 follows:
40 .Bl -tag -width "\-Werr... "
41 .\" ITEM
42 .It Fl v
43 Print verbose parsing output.
44 .\" ITEM
45 .It Fl W Ns Ar err...
46 Print warning messages. May be set to
47 .Fl W Ns Ar all
48 for all warnings,
49 .Ar compat
50 for groff/troff-compatibility warnings, or
51 .Ar syntax
52 for syntax warnings. If
53 .Fl W Ns Ar error
54 is specified, warnings are considered errors and cause utility
55 termination. Multiple
56 .Fl W
57 arguments may be comma-separated, such as
58 .Fl W Ns Ar error,all .
59 .\" ITEM
60 .It Ar infile
61 Read input from
62 .Ar infile ,
63 which may be
64 .Dq \-
65 for stdin.
66 .El
67 .\" PARAGRAPH
68 .Pp
69 The
70 .Nm
71 utility is a front-end for
72 .Xr mdoc 3 ,
73 which parses the
74 .Dq mdoc
75 input, documented at
76 .Xr mdoc 7
77 and
78 .Xr mdoc.samples 7 ,
79 into an abstract syntax tree.
80 .\" PARAGRAPH
81 .Pp
82 By default,
83 .Nm
84 reads from stdin.
85 .\" PARAGRAPH
86 .Pp
87 .Ex -std mdoclint
88 .\" PARAGRAPH
89 .Pp
90 .Nm
91 is
92 .Ud
93 .\" SECTION
94 .Sh EXAMPLES
95 To validate this manual page:
96 .\" PARAGRAPH
97 .Pp
98 .D1 % mdoclint \-Wall,error mdoclint.1
99 .\" SECTION
100 .Sh SEE ALSO
101 .Xr mdocterm 1 ,
102 .Xr mdoctree 1 ,
103 .Xr mdoc.samples 7 ,
104 .Xr mdoc 7 ,
105 .Xr mdoc 3
106 .\"
107 .Sh AUTHORS
108 The
109 .Nm
110 utility was written by
111 .An Kristaps Dzonsons Aq kristaps@kth.se .
112 .\" SECTION
113 .Sh CAVEATS
114 See
115 .Xr mdoc 3
116 for a list of bugs, caveats, and incomplete macros.