]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/xolint/xolint.1
Update to bmake-20171028
[FreeBSD/FreeBSD.git] / contrib / libxo / xolint / xolint.1
1 .\" #
2 .\" # Copyright (c) 2014, Juniper Networks, Inc.
3 .\" # All rights reserved.
4 .\" # This SOFTWARE is licensed under the LICENSE provided in the
5 .\" # ../Copyright file. By downloading, installing, copying, or 
6 .\" # using the SOFTWARE, you agree to be bound by the terms of that
7 .\" # LICENSE.
8 .\" # Phil Shafer, July 2014
9 .\" 
10 .Dd December 4, 2014
11 .Dt XOLINT 1
12 .Os
13 .Sh NAME
14 .Nm xolint
15 .Nd detect errors in programs using
16 .Xr xo_emit 3
17 .Sh SYNOPSIS
18 .Nm xolint
19 .Op Fl c
20 .Op Fl "C <flags>"
21 .Op Fl "d"
22 .Op Fl "D"
23 .Op Fl "I"
24 .Op Fl "p"
25 .Op Fl "V"
26 .Op Fl "X"
27 .Op Ar files...
28 .Sh DESCRIPTION
29 .Nm
30 is a tool for reporting common mistakes in format strings
31 in source code that invokes
32 .Xr xo_emit 3 .
33 It allows these errors
34 to be diagnosed at build time, rather than waiting until runtime.
35 .Pp
36 .Nm
37 takes one or more C files as arguments, and reports
38 error, warning, or informational messages as needed.
39 .Bl -tag -width "C <flags>"
40 .It Fl c
41 Invoke 'cpp' against the input file
42 .It Fl "C <flags>"
43 Flags that are passed to 'cpp'
44 .It Fl "d"
45 Enable debug output
46 .It Fl "D"
47 Generate documentation for all
48 .Nm
49 messages
50 .It Fl "I"
51 Generate a table of
52 .Dv xo_info_t
53 structures.
54 .It Fl "p"
55 Print the offending lines after the error message is displayed
56 .It Fl "V"
57 Do not report errors, but instead print a complete list of
58 all field names, sorted alphabetically.
59 The output can help spot
60 inconsistencies and spelling errors.
61 .It Fl "X"
62 Extract samples from
63 .Nm ,
64 suitable for internal testing.
65 .El
66 .Pp
67 The output message contains the source filename and line number, the
68 class of the message, the message, and, if
69 .Fl p
70 is given, the
71 line that contains the error:
72 .Bd -literal -offset indent
73     % xolint -t xolint.c
74     xolint.c: 16: error: anchor format should be "%d"
75     16         xo_emit("{[:/%s}");
76 .Ed
77 .Sh SEE ALSO
78 .Xr libxo 3 ,
79 .Xr xo_emit 3
80 .Sh HISTORY
81 The
82 .Nm libxo
83 library first appeared in
84 .Fx 11.0 .
85 .Sh AUTHORS
86 .Nm libxo
87 was written by
88 .An Phil Shafer Aq Mt phil@freebsd.org .
89