Skip to content

Commit 8aab3ce

Browse files
ericentinJosé Valim
authored andcommitted
mix xref: loadpaths before compile (#5050)
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
1 parent 59d6c80 commit 8aab3ce

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

lib/mix/lib/mix/tasks/xref.ex

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ defmodule Mix.Tasks.Xref do
1313
## Xref modes
1414
1515
The `xref` task expects a mode as first argument:
16-
16+
1717
mix xref MODE
18-
18+
1919
All available modes are discussed below.
20-
20+
2121
### warnings
2222
2323
Prints warnings for violated cross reference checks:
24-
24+
2525
mix xref warnings
26-
26+
2727
This is the mode used by Mix during compilation.
2828
2929
### unreachable
3030
3131
Prints all unreachable "file:line: module.function/arity" entries:
32-
32+
3333
mix xref unreachable
34-
34+
3535
The "file:line" represents the file and line a call to an unknown
3636
"module.function/arity" is made.
37-
37+
3838
### callers CALLEE
3939
4040
Prints all callers of the given `CALLEE`, which can be one of: `Module`,
@@ -48,7 +48,7 @@ defmodule Mix.Tasks.Xref do
4848
4949
Prints a file dependency graph where an edge from `A` to `B` indicates
5050
that `A` depends on `B`.
51-
51+
5252
mix xref graph --format dot
5353
5454
The following options are accepted:
@@ -106,6 +106,8 @@ defmodule Mix.Tasks.Xref do
106106
{opts, args} =
107107
OptionParser.parse!(args, strict: @switches)
108108

109+
Mix.Task.run("loadpaths")
110+
109111
if Keyword.get(opts, :compile, true) do
110112
Mix.Task.run("compile")
111113
end

0 commit comments

Comments
 (0)