#852 - Capture error codes for ansible-lint
This commit is contained in:
parent
37f2f70439
commit
ff5c6b0509
2 changed files with 6 additions and 3 deletions
|
@ -31,7 +31,8 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, lines) abort
|
|||
call add(l:output, {
|
||||
\ 'lnum': l:match[2] + 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',
|
||||
\})
|
||||
endif
|
||||
|
|
|
@ -12,7 +12,8 @@ Execute(The ansible-lint handler should handle basic errors):
|
|||
\ 'lnum': 35,
|
||||
\ 'col': 0,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'EANSIBLE0002: Trailing whitespace',
|
||||
\ 'text': 'Trailing whitespace',
|
||||
\ 'code': 'EANSIBLE0002',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
||||
|
@ -26,7 +27,8 @@ Execute (The ansible-lint handler should handle names with spaces):
|
|||
\ 'lnum': 6,
|
||||
\ 'col': 6,
|
||||
\ '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(''), [
|
||||
|
|
Reference in a new issue