Extract error code from message
This commit is contained in:
@@ -5,7 +5,7 @@ function! ale_linters#solidity#solhint#Handle(buffer, lines) abort
|
||||
" Matches patterns like the following:
|
||||
" /path/to/file/file.sol: line 1, col 10, Error - 'addOne' is defined but never used. (no-unused-vars)
|
||||
|
||||
let l:pattern = '\v^[^:]+: line (\d+), col (\d+), (Error|Warning) - (.*)$'
|
||||
let l:pattern = '\v^[^:]+: line (\d+), col (\d+), (Error|Warning) - (.*) \((.*)\)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
@@ -14,7 +14,8 @@ function! ale_linters#solidity#solhint#Handle(buffer, lines) abort
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': l:match[2] + 0,
|
||||
\ 'text': l:match[4],
|
||||
\ 'type': l:isError ? 'E' : 'W'
|
||||
\ 'code': l:match[5],
|
||||
\ 'type': l:isError ? 'E' : 'W',
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user