#852 - Capture error codes for ansible-lint
This commit is contained in:
parent
37f2f70439
commit
ff5c6b0509
@ -31,7 +31,8 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort
|
|||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'lnum': l:match[2] + 0,
|
\ 'lnum': l:match[2] + 0,
|
||||||
\ 'col': l:match[3] + 0,
|
\ 'col': l:match[3] + 0,
|
||||||
\ 'text': l:code . ': ' . l:match[5],
|
\ 'text': l:match[5],
|
||||||
|
\ 'code': l:code,
|
||||||
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W',
|
\ 'type': l:code[:0] is# 'E' ? 'E' : 'W',
|
||||||
\})
|
\})
|
||||||
endif
|
endif
|
||||||
|
@ -12,7 +12,8 @@ Execute(The ansible-lint handler should handle basic errors):
|
|||||||
\ 'lnum': 35,
|
\ 'lnum': 35,
|
||||||
\ 'col': 0,
|
\ 'col': 0,
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ 'text': 'EANSIBLE0002: Trailing whitespace',
|
\ 'text': 'Trailing whitespace',
|
||||||
|
\ 'code': 'EANSIBLE0002',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
||||||
@ -26,7 +27,8 @@ Execute (The ansible-lint handler should handle names with spaces):
|
|||||||
\ 'lnum': 6,
|
\ 'lnum': 6,
|
||||||
\ 'col': 6,
|
\ 'col': 6,
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ 'text': 'E111: indentation is not a multiple of four',
|
\ 'text': 'indentation is not a multiple of four',
|
||||||
|
\ 'code': 'E111',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
||||||
|
Loading…
Reference in New Issue
Block a user