mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-02 16:33:45 +08:00
Fix #1186 - Use -w by default for Perl, which does not execute code
This commit is contained in:
1 parent
83760a0952
commit
f5fc746d00
3 files changed
+45
-7
No files matched your search
@@ -0,0 +1,37 @@
|
||||
Before:
|
||||
Save g:ale_perl_perl_executable
|
||||
Save g:ale_perl_perl_options
|
||||
|
||||
unlet! g:ale_perl_perl_executable
|
||||
unlet! g:ale_perl_perl_options
|
||||
|
||||
runtime ale_linters/perl/perl.vim
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:ale_perl_perl_executable
|
||||
unlet! b:ale_perl_perl_options
|
||||
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The default Perl command callback should be correct):
|
||||
AssertEqual
|
||||
\ 'perl',
|
||||
\ ale_linters#perl#perl#GetExecutable(bufnr(''))
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('perl') . ' -w -Mwarnings -Ilib %t',
|
||||
\ ale_linters#perl#perl#GetCommand(bufnr(''))
|
||||
|
||||
Execute(Overriding the executable and command should work):
|
||||
let b:ale_perl_perl_executable = 'foobar'
|
||||
let b:ale_perl_perl_options = '-c'
|
||||
|
||||
AssertEqual
|
||||
\ 'foobar',
|
||||
\ ale_linters#perl#perl#GetExecutable(bufnr(''))
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('foobar') . ' -c %t',
|
||||
\ ale_linters#perl#perl#GetCommand(bufnr(''))
|
||||
Reference in new issue
Block a user