diff options
Diffstat (limited to 'ale_linters/perl/perl.vim')
-rw-r--r-- | ale_linters/perl/perl.vim | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/ale_linters/perl/perl.vim b/ale_linters/perl/perl.vim index 1b9aa95e..d1dcbc9c 100644 --- a/ale_linters/perl/perl.vim +++ b/ale_linters/perl/perl.vim @@ -1,20 +1,11 @@ " Author: Vincent Lequertier <https://github.com/SkySymbol> " Description: This file adds support for checking perl syntax -let g:ale_perl_perl_executable = -\ get(g:, 'ale_perl_perl_executable', 'perl') - -let g:ale_perl_perl_options = -\ get(g:, 'ale_perl_perl_options', '-c -Mwarnings -Ilib') - -function! ale_linters#perl#perl#GetExecutable(buffer) abort - return ale#Var(a:buffer, 'perl_perl_executable') -endfunction +call ale#Set('perl_perl_executable', 'perl') +call ale#Set('perl_perl_options', '-c -Mwarnings -Ilib') function! ale_linters#perl#perl#GetCommand(buffer) abort - return ale#Escape(ale_linters#perl#perl#GetExecutable(a:buffer)) - \ . ' ' . ale#Var(a:buffer, 'perl_perl_options') - \ . ' %t' + return '%e' . ale#Pad(ale#Var(a:buffer, 'perl_perl_options')) . ' %t' endfunction let s:begin_failed_skip_pattern = '\v' . join([ @@ -61,7 +52,7 @@ endfunction call ale#linter#Define('perl', { \ 'name': 'perl', -\ 'executable_callback': 'ale_linters#perl#perl#GetExecutable', +\ 'executable_callback': ale#VarFunc('perl_perl_executable'), \ 'output_stream': 'both', \ 'command_callback': 'ale_linters#perl#perl#GetCommand', \ 'callback': 'ale_linters#perl#perl#Handle', |