summaryrefslogtreecommitdiff
path: root/ale_linters/erlang
diff options
context:
space:
mode:
authorAntoine Gagné <gagnantoine@gmail.com>2019-07-22 09:50:16 -0400
committerAntoine Gagné <gagnantoine@gmail.com>2019-07-22 09:50:16 -0400
commitc675212dddbe3cb7288c28d8d86769c5ccc3a8c8 (patch)
tree250b73e5bec29083d4b74929c869f3b0aac2cfaf /ale_linters/erlang
parentaae6d30b1ec135e37ec3bea1885d161c6174572b (diff)
downloadale-c675212dddbe3cb7288c28d8d86769c5ccc3a8c8.zip
Fix bug with detection of the PLT
Previously, it did not detect the PLT inside the `_build` directory and would always default to the default PLT or the one from the `kerl` tool.
Diffstat (limited to 'ale_linters/erlang')
-rw-r--r--ale_linters/erlang/dialyzer.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ale_linters/erlang/dialyzer.vim b/ale_linters/erlang/dialyzer.vim
index 7af64c4f..395647a0 100644
--- a/ale_linters/erlang/dialyzer.vim
+++ b/ale_linters/erlang/dialyzer.vim
@@ -15,10 +15,10 @@ endfunction
function! ale_linters#erlang#dialyzer#FindPlt(buffer) abort
let l:plt_file = ''
let l:rebar3_profile = ale_linters#erlang#dialyzer#GetRebar3Profile(a:buffer)
- let l:plt_file_directory = ale#path#FindNearestDirectory(a:buffer, '_build' . l:rebar3_profile)
+ let l:plt_file_directory = ale#path#FindNearestDirectory(a:buffer, '_build/' . l:rebar3_profile)
if !empty(l:plt_file_directory)
- let l:plt_file = split(globpath(l:plt_file_directory, '/*_plt'), '\n')
+ let l:plt_file = globpath(l:plt_file_directory, '*_plt', 0, 1)
endif
if !empty(l:plt_file)