Skip to content

Commit

Permalink
Add unreachable options to manpage (#14164)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Jan 4, 2024
1 parent 2afc7c1 commit e1fefe1
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions man/crystal.1
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,49 @@ to specify the cursor position. The format for the cursor position is file:line:
.It Cm types
Show type of main variables of file.
.It Cm unreachable
Show methods that are never called. The output is a list of lines with columns
separated by tab. The first column is the location of the def, the second column
its reference name and the third column is the length in lines.
Show methods that are never called. The text output is a list of lines with columns
separated by tab.

.Pp
Output fields:

.Bl -tag -width "1234567890" -compact
.Pp
.It Cm count
sum of all calls to this method (only with
.Fl -tallies
option; otherwise skipped)
.It Cm location
pathname, line and column, all separated by colon
.It Cm name
.It Cm lines
length of the def in lines
.It Cm annotations
.El

.Pp
Options:
.Bl -tag -width "12345678" -compact
.Pp
.It Fl D Ar FLAG, Fl -define= Ar FLAG
Define a compile-time flag. This is useful to conditionally 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.
.It Fl f Ar FORMAT, Fl -format= Ar FORMAT
Output format 'text' (default), 'json', or 'csv'.
.It Fl -tallies
Print reachable methods and their call counts as well.
.It Fl -check
Exit with error if there is any unreachable code.
.It Fl i Ar PATH, Fl -include= Ar PATH
Include path in output.
.It Fl e Ar PATH, Fl -exclude= Ar PATH
Exclude path in output (default:
.Sy lib
).
.It Fl -error-trace
Show full error trace.
.It Fl -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.
.El
.El
.Pp
.It
Expand Down

0 comments on commit e1fefe1

Please sign in to comment.