XOLINT(1)

πŸ“¦ version 1.7.5, in epel 9, fedora 43, fedora 44, nixpkgs unstable

πŸ’– 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 β€” invoke cpp against the input file
  • -C <flags> β€” the flags that get passed to cpp
  • -d β€” enable debug output
  • -D β€” generate documentation for all xolint messages
  • -I β€” generate a table of xo_info_t structures
  • -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 from xolint, 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 πŸ’œ

libxo(3), xo_emit(3)


🌈 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