From ecbb27680563a50d4dd981f968d659ef20bfbe30 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 11 Feb 2017 19:40:57 +0000 Subject: Replace every stdin-wrapper script with the new %t formatting support --- ale_linters/cs/mcs.vim | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'ale_linters/cs/mcs.vim') diff --git a/ale_linters/cs/mcs.vim b/ale_linters/cs/mcs.vim index edf3bd27..3d39cfb7 100644 --- a/ale_linters/cs/mcs.vim +++ b/ale_linters/cs/mcs.vim @@ -1,6 +1,8 @@ -if !exists('g:ale_cs_mcs_options') - let g:ale_cs_mcs_options = '' -endif +let g:ale_cs_mcs_options = get(g:, 'ale_cs_mcs_options', '') + +function! ale_linters#cs#mcs#GetCommand(buffer) abort + return 'mcs -unsafe --parse ' . g:ale_cs_mcs_options . ' %t' +endfunction function! ale_linters#cs#mcs#Handle(buffer, lines) abort " Look for lines like the following. @@ -31,10 +33,9 @@ function! ale_linters#cs#mcs#Handle(buffer, lines) abort endfunction call ale#linter#Define('cs',{ -\ 'name': 'mcs', -\ 'output_stream': 'stderr', -\ 'executable': 'mcs', -\ 'command': g:ale#util#stdin_wrapper . ' .cs mcs -unsafe --parse' . g:ale_cs_mcs_options, -\ 'callback': 'ale_linters#cs#mcs#Handle', -\ }) - +\ 'name': 'mcs', +\ 'output_stream': 'stderr', +\ 'executable': 'mcs', +\ 'command_callback': 'ale_linters#cs#mcs#GetCommand', +\ 'callback': 'ale_linters#cs#mcs#Handle', +\}) -- cgit v1.2.3