CRYST...HABLE(1)
π 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 colonlinesβ 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=emptyto 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
- arch rolling: crystal 1.22.2-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms