summaryrefslogtreecommitdiff
path: root/ale_linters/solidity
diff options
context:
space:
mode:
authorFranco Victorio <victorio.franco@gmail.com>2017-12-05 16:02:15 -0300
committerFranco Victorio <victorio.franco@gmail.com>2017-12-05 16:02:15 -0300
commit85e0bd33141a05216848e525b3e86b6698aa38cd (patch)
tree9f292e9e769dc16c553879c199703b8474e51eaf /ale_linters/solidity
parent57e1b03435c94cd93748a87ee9fbd285452d91ca (diff)
downloadale-85e0bd33141a05216848e525b3e86b6698aa38cd.zip
Extract error code from message
Diffstat (limited to 'ale_linters/solidity')
-rw-r--r--ale_linters/solidity/solhint.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/solidity/solhint.vim b/ale_linters/solidity/solhint.vim
index cab2c18a..519fd49d 100644
--- a/ale_linters/solidity/solhint.vim
+++ b/ale_linters/solidity/solhint.vim
@@ -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