---
name: "crystal-tool-unreachable"
section: "1"
platform: "linux"
package: "crystal"
version: "1.22.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/crystal-tool-unreachable"
---

# crystal-tool-unreachable(1)

Identify methods that are never called

## 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 collector. You can also use **--prelude=empty** to use no preludes. This can be useful for checking code generation for a specific source code file.
