summaryrefslogtreecommitdiff
path: root/ale_linters/cs/mcs.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/cs/mcs.vim')
-rw-r--r--ale_linters/cs/mcs.vim21
1 files changed, 11 insertions, 10 deletions
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',
+\})