From c675212dddbe3cb7288c28d8d86769c5ccc3a8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Gagn=C3=A9?= Date: Mon, 22 Jul 2019 09:50:16 -0400 Subject: 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. --- ale_linters/erlang/dialyzer.vim | 4 ++-- 1 file 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) -- cgit v1.2.3