diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-19 00:19:09 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-19 00:19:09 +0000 |
commit | 3c8f3221df1afe40ab8476c6b71a50a6f21df9c7 (patch) | |
tree | a7dc2f6e5c7651d2296e9a204ab9d75d9bb248b5 /ale_linters/cs/mcs.vim | |
parent | 40e26f0bc2a00d25defe190bc277a0cf6ea71479 (diff) | |
download | ale-3c8f3221df1afe40ab8476c6b71a50a6f21df9c7.zip |
#852 - Capture error codes for mcs and mcsc
Diffstat (limited to 'ale_linters/cs/mcs.vim')
-rw-r--r-- | ale_linters/cs/mcs.vim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ale_linters/cs/mcs.vim b/ale_linters/cs/mcs.vim index 3d042f99..b5c4054a 100644 --- a/ale_linters/cs/mcs.vim +++ b/ale_linters/cs/mcs.vim @@ -8,15 +8,16 @@ function! ale_linters#cs#mcs#Handle(buffer, lines) abort " Look for lines like the following. " " Tests.cs(12,29): error CSXXXX: ; expected - let l:pattern = '^.\+.cs(\(\d\+\),\(\d\+\)): \(.\+\): \(.\+\)' + let l:pattern = '^\v(.+\.cs)\((\d+),(\d+)\)\: ([^ ]+) ([^ ]+): (.+)$' let l:output = [] for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { - \ 'lnum': l:match[1] + 0, - \ 'col': l:match[2] + 0, - \ 'text': l:match[3] . ': ' . l:match[4], - \ 'type': l:match[3] =~# '^error' ? 'E' : 'W', + \ 'lnum': l:match[2] + 0, + \ 'col': l:match[3] + 0, + \ 'type': l:match[4] is# 'error' ? 'E' : 'W', + \ 'code': l:match[5], + \ 'text': l:match[6], \}) endfor |