5 `xolint` is a tool for reporting common mistakes in format strings
6 in source code that invokes `xo_emit`. It allows these errors
7 to be diagnosed at build time, rather than waiting until runtime.
9 `xolint` takes the one or more C files as arguments, and reports
10 and errors, warning, or informational messages as needed:
12 ============ ===================================================
14 ============ ===================================================
15 -c Invoke 'cpp' against the input file
16 -C <flags> Flags that are passed to 'cpp
17 -d Enable debug output
18 -D Generate documentation for all xolint messages
19 -I Generate info table code
20 -p Print the offending lines after the message
21 -V Print vocabulary of all field names
22 -X Extract samples from xolint, suitable for testing
23 ============ ===================================================
25 The output message will contain the source filename and line number, the
26 class of the message, the message, and, if -p is given, the
27 line that contains the error::
29 % xolint.pl -t xolint.c
30 xolint.c: 16: error: anchor format should be "%d"
31 16 xo_emit("{[:/%s}");
33 The "-I" option will generate a table of `xo_info_t`_ structures,
34 suitable for inclusion in source code.
36 .. _xo_info_t: :ref:`field-information`
38 The "-V" option does not report errors, but prints a complete list of
39 all field names, sorted alphabetically. The output can help spot
40 inconsistencies and spelling errors.