'\" t .\" Title: crystal-tool-unreachable .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.26 .\" Date: 2026-07-23 .\" Manual: Crystal Compiler Command Line Reference Guide .\" Source: crystal 1.21.0 .\" Language: English .\" .TH "CRYSTAL\-TOOL\-UNREACHABLE" "1" "2026-07-23" "crystal 1.21.0" "Crystal Compiler Command Line Reference Guide" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" crystal-tool-unreachable \- Identify methods that are never called .SH "SYNOPSIS" .sp \fBcrystal tool unreachable\fP [options] [source.\|.\|.] .SH "DESCRIPTION" .sp Show methods that are never called. The text output is a list of lines with columns separated by tab. .sp Output fields: .sp \fBcount\fP .RS 4 sum of all calls to this method (only with \fB\-\-tallies\fP option; otherwise skipped) .RE .sp \fBlocation\fP .RS 4 pathname, line and column, all separated by colon name .RE .sp \fBlines\fP .RS 4 length of the def in lines annotations .RE .SH "OPTIONS" .sp \fB\-D\fP \fIFLAG\fP, \fB\-\-define\fP=\fIFLAG\fP .RS 4 Define a compile\-time flag. This is useful to con ditionally define types, methods, or commands based on flags available at compile time. The default flags are from the target triple given with \fB\-\-target\-triple\fP or the hosts default, if none is given. .RE .sp \fB\-f\fP \fIFORMAT\fP, \fB\-\-format\fP=\fIFORMAT\fP .RS 4 Output format \*(Aqtext\*(Aq (default), \*(Aqjson\*(Aq, \*(Aqcodecov\*(Aq, or \*(Aqcsv\*(Aq. .RE .sp \fB\-\-tallies\fP .RS 4 Print reachable methods and their call counts as well. .RE .sp \fB\-\-check\fP .RS 4 Exit with error if there is any unreachable code. .RE .sp \fB\-i\fP \fIPATH\fP, \fB\-\-include\fP=\fIPATH\fP .RS 4 Include path in output. .RE .sp \fB\-e\fP \fIPATH\fP, \fB\-\-exclude\fP=\fIPATH\fP .RS 4 Exclude path in output (default: lib). .RE .sp \fB\-\-error\-trace\fP .RS 4 Show full error trace. .RE .sp \fB\-\-prelude\fP .RS 4 Specify prelude to use. The default one initializes the garbage collector. You can also use \fB\-\-prelude=empty\fP to use no preludes. This can be useful for checking code generation for a specific source code file. .RE