diff options
author | w0rp <devw0rp@gmail.com> | 2018-08-02 23:44:12 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-08-02 23:44:12 +0100 |
commit | 217284360d35711b751859ed27a7a3c3da300e85 (patch) | |
tree | 4b26a84b397e3ac15a8b13a572b1f9a50312dbab /ale_linters/tcl/nagelfar.vim | |
parent | 9ef266d050d698c3ed3be3456ce6a5da5755d5ef (diff) | |
download | ale-217284360d35711b751859ed27a7a3c3da300e85.zip |
Simplify the code for most linters and tests with closures
Diffstat (limited to 'ale_linters/tcl/nagelfar.vim')
-rw-r--r-- | ale_linters/tcl/nagelfar.vim | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ale_linters/tcl/nagelfar.vim b/ale_linters/tcl/nagelfar.vim index 13b7a549..183ea9e7 100644 --- a/ale_linters/tcl/nagelfar.vim +++ b/ale_linters/tcl/nagelfar.vim @@ -4,16 +4,10 @@ call ale#Set('tcl_nagelfar_executable', 'nagelfar.tcl') call ale#Set('tcl_nagelfar_options', '') -function! ale_linters#tcl#nagelfar#GetExecutable(buffer) abort - return ale#Var(a:buffer, 'tcl_nagelfar_executable') -endfunction - function! ale_linters#tcl#nagelfar#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'tcl_nagelfar_options') - return ale#Escape(ale_linters#tcl#nagelfar#GetExecutable(a:buffer)) - \ . (!empty(l:options) ? ' ' . l:options : '') - \ . ' %s' + return '%e' . ale#Pad(l:options) . ' %s' endfunction function! ale_linters#tcl#nagelfar#Handle(buffer, lines) abort @@ -39,7 +33,7 @@ endfunction call ale#linter#Define('tcl', { \ 'name': 'nagelfar', \ 'output_stream': 'stdout', -\ 'executable_callback': 'ale_linters#tcl#nagelfar#GetExecutable', +\ 'executable_callback': ale#VarFunc('tcl_nagelfar_executable'), \ 'command_callback': 'ale_linters#tcl#nagelfar#GetCommand', \ 'callback': 'ale_linters#tcl#nagelfar#Handle', \ 'lint_file': 1, |