CRYST...HABLE(1)

πŸ“¦
version 1.22.2 Β· 3 versions
, in arch rolling

πŸ’… CRYST...HABLE(1) β€” the Crystal Compiler Command Line Reference Guide, but make it make sense

okay bestie, so this is a page from the Crystal Compiler Command Line Reference Guide and honestly? it's lowkey iconic once you get past the manpage voice. sit down, hydrate, let's go 🫢


✨ NAME ✨

crystal-tool-unreachable β€” the little snitch that finds methods nobody ever calls πŸ’€

✨ SYNOPSIS ✨

crystal tool unreachable [options] [source...]

that's it, that's the whole vibe check. options then your sources, slay πŸ”₯

✨ DESCRIPTION ✨

okay so what this thing does is show you methods that are never called. dead code detective energy, no cap πŸ•΅οΈβ€β™€οΈ it's giving "who invited you" but for your own functions.

the text output is a list of lines, and the columns are separated by a tab character (yes, actual tab, not vibes).

here's what the fields mean, bestie:

  • count β€” sum of all calls to this method (only shows up with --tallies; otherwise it's literally skipped, gone, not invited to the party πŸ™ˆ)
  • location β€” pathname, line and column, all separated by colon
  • lines β€” length of the def in lines annotations

✨ OPTIONS ✨

so many options, all of them valid, all of them yours πŸ’…

  • -D FLAG, --define=FLAG β€” defines a compile-time flag. super useful for conditionally defining types, methods, or commands based on flags available at compile time. where do the default flags come from? the target triple you gave with --target-triple, or the host's default if you didn't give one. iykyk πŸŽ€
  • -f FORMAT, --format=FORMAT β€” picks the output format. your choices are 'text' (the default, the classic), 'json', 'codecov', or 'csv'. choose your fighter ✨
  • --tallies β€” prints reachable methods and their call counts as well. main character energy, showing the stuff that actually survived.
  • --check β€” exits with an error if there's any unreachable code at all. harsh? no. correct? yes. 🚨
  • -i PATH, --include=PATH β€” include path in output.
  • -e PATH, --exclude=PATH β€” exclude path in output (default: lib).
  • --error-trace β€” shows the full error trace. the receipts, the whole receipts 🧾
  • --prelude β€” specifies which prelude to use. the default one initializes the garbage collector, which is kind of a big deal. you can also do --prelude=empty to use no preludes at all β€” honestly super useful for checking code generation for a specific source code file 🌸

ngl this is the moment where i remind you: those option spellings are exact, so copy them, don't improvise. the compiler is not forgiving and i am not either 😭

that's the whole page bestie, you ate πŸ’– this came to you courtesy of crystal 1.22.2, dated 2026-10-30 β€” go forth and hunt that dead code, periodt πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from