XOLINT(1)
π XOLINT β the linter that has your xo_emit(3) back π
okay so bestie, this is the manual page for xolint, section 1 of the manual. let's get into it β¨
β¨ NAME β¨
xolint β detect errors in programs using xo_emit(3)
πΈ SYNOPSIS πΈ
xolint [-c] [-C <flags>] [-d] [-D] [-I] [-p] [-V] [-X] [files...]
π¦ DESCRIPTION π¦
So <pink>xolint</pink> is literally the tool that catches the mistakes everybody makes in format strings inside source code that calls xo_emit(3). the whole point is that you find out at build time instead of sitting there at runtime like π§ββοΈ going "why is my output cursed". iconic behaviour, honestly.
It takes one or more C files as arguments, and it reports error, warning, or informational messages as needed. that's it, that's the job. π
Here's the flags, one at a time, no skipping, we respect every single one in this house:
-cβ invokecppagainst the input file-C <flags>β the flags that get passed tocpp-dβ enable debug output-Dβ generate documentation for allxolintmessages-Iβ generate a table ofxo_info_tstructures-pβ print the offending lines after the error message is displayed-Vβ do not report errors; instead print a complete list of all field names, sorted alphabetically. the output can help you spot inconsistencies and spelling errors π (spelling errors are so real)-Xβ extract samples fromxolint, suitable for internal testing
π what a message even looks like π
The output message contains the source filename and line number, the class of the message, the message, and β if you gave it -p β the line that contains the error:
% xolint -t xolint.c
xolint.c: 16: error: anchor format should be "%d"
16 xo_emit("{[:/%s}");
like. it literally points at the line. main character energy. π
π SEE ALSO π
π HISTORY π
The libxo library first appeared in FreeBSD 11.0.
π«Ά AUTHORS π«Ά
libxo was written by Phil Shafer <phil@freebsd.org>.
π ADDITIONAL DOCUMENTATION π
FreeBSD uses libxo version 1.7.5. Complete documentation can be found on github:
https://juniper.github.io/libxo/1.7.5/html/index.html
libxo lives on github as:
https://github.com/Juniper/libxo
The latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
β HISTORY β
The libxo library was added in FreeBSD 11.0.
π AUTHOR π
Phil Shafer
ngl that's the whole page, you read it all, I'm so proud π₯Ή
okay bestie this was the Debian build of the xolint page, dated December 4, 2014 β go forth and lint, you've got this πβ¨π
π¦ where this page comes from
- epel 9: libxo 1.7.5-1.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: libxo 1.7.5
- Copyright (c) 2014, Juniper Networks, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms