Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions lib/mix/lib/mix/tasks/xref.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ defmodule Mix.Tasks.Xref do
## Xref modes

The `xref` task expects a mode as first argument:

mix xref MODE

All available modes are discussed below.

### warnings

Prints warnings for violated cross reference checks:

mix xref warnings

This is the mode used by Mix during compilation.

### unreachable

Prints all unreachable "file:line: module.function/arity" entries:

mix xref unreachable

The "file:line" represents the file and line a call to an unknown
"module.function/arity" is made.

### callers CALLEE

Prints all callers of the given `CALLEE`, which can be one of: `Module`,
Expand All @@ -48,7 +48,7 @@ defmodule Mix.Tasks.Xref do

Prints a file dependency graph where an edge from `A` to `B` indicates
that `A` depends on `B`.

mix xref graph --format dot

The following options are accepted:
Expand Down Expand Up @@ -106,6 +106,8 @@ defmodule Mix.Tasks.Xref do
{opts, args} =
OptionParser.parse!(args, strict: @switches)

Mix.Task.run("loadpaths")

if Keyword.get(opts, :compile, true) do
Mix.Task.run("compile")
end
Expand Down