home | help
CRYST...HABLE(1)  Crystal Compiler Command Line Reference Guide CRYST...HABLE(1)

NAME
     crystal-tool-unreachable - Identify methods that are never called

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

DESCRIPTION
     Show methods that are never called. The text output is a list of lines with
     columns separated by tab.

     Output fields:

     count
	 sum  of all calls to this method (only with --tallies option; otherwise
	 skipped)

     location
	 pathname, line and column, all separated by colon name

     lines
	 length of the def in lines annotations

OPTIONS
     -D FLAG, --define=FLAG
	 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 --target-triple
	 or the hosts default, if none is given.

     -f FORMAT, --format=FORMAT
	 Output format 'text' (default), 'json', 'codecov', or 'csv'.

     --tallies
	 Print reachable methods and their call counts as well.

     --check
	 Exit with error if there is any unreachable code.

     -i PATH, --include=PATH
	 Include path in output.

     -e PATH, --exclude=PATH
	 Exclude path in output (default: lib).

     --error-trace
	 Show full error trace.

     --prelude
	 Specify prelude to use. The default one initializes the garbage collec-
	 tor. You can also use --prelude=empty to use no preludes. This  can  be
	 useful for checking code generation for a specific source code file.

crystal 1.21.0			   2026-07-16			CRYST...HABLE(1)

home | help