#852 - Capture error codes for swaglint

This commit is contained in:
w0rp
2017-11-19 12:46:06 +00:00
parent d7a60ade77
commit b16c82f2f1
2 changed files with 22 additions and 7 deletions

View File

@@ -27,6 +27,14 @@ function! ale_linters#yaml#swaglint#Handle(buffer, lines) abort
\ 'text': l:match[4],
\}
" Parse the code if it's there.
let l:code_match = matchlist(l:obj.text, '\v^(.+) \(([^ (]+)\)$')
if !empty(l:code_match)
let l:obj.text = l:code_match[1]
let l:obj.code = l:code_match[2]
endif
call add(l:output, l:obj)
endfor