Skip to content

Commit

Permalink
fix check-dialyzer script to properly fix full path (2600hz#6102)
Browse files Browse the repository at this point in the history
For kazoo apps repo, we use the full path as changed file, and pass
that to check_dialyzer script. But that script is not properly
converting the erl file path (full path) to correct ebin
file (dropping the leading "/" from the beginning) causing to not
dialyze anything at all.
  • Loading branch information
icehess authored and jamesaimonetti committed Oct 18, 2019
1 parent d1d787e commit 138f3d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/check-dialyzer.escript
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ is_beam(Path) ->
is_ebin_dir(Path) ->
"ebin" == filename:basename(Path).

root_dir("/"++Path) ->
filename:join(["/" | lists:takewhile(fun is_not_src/1
,string:tokens(Path, "/")
)
]
);
root_dir(Path) ->
filename:join(lists:takewhile(fun is_not_src/1
,string:tokens(Path, "/")
Expand Down

0 comments on commit 138f3d5

Please sign in to comment.