summaryrefslogtreecommitdiff
path: root/ale_linters/cs
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-11 19:40:57 +0000
committerw0rp <devw0rp@gmail.com>2017-02-11 19:40:57 +0000
commitecbb27680563a50d4dd981f968d659ef20bfbe30 (patch)
tree3e60f1ad7840dce1351819cd191a4c7ca0a7330e /ale_linters/cs
parentc33602534e205aa677521ce49a8054588d88bdc2 (diff)
downloadale-ecbb27680563a50d4dd981f968d659ef20bfbe30.zip
Replace every stdin-wrapper script with the new %t formatting support
Diffstat (limited to 'ale_linters/cs')
-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',
+\})