Update argon
This commit is contained in:
parent
c58eab1c0e
commit
2f0190fad6
@ -27,6 +27,11 @@ function! ale_linters#haskell#argon#Handle(buffer, lines) abort
|
|||||||
let l:output = []
|
let l:output = []
|
||||||
|
|
||||||
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
|
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
|
||||||
|
if !has_key(l:error, 'blocks')
|
||||||
|
" this cannot be formatted properly into an ALE error
|
||||||
|
execute 'echom ''[argon] '' l:error.message'
|
||||||
|
return l:output
|
||||||
|
endif
|
||||||
for l:block in l:error.blocks
|
for l:block in l:error.blocks
|
||||||
let l:complexity = l:block.complexity
|
let l:complexity = l:block.complexity
|
||||||
|
|
||||||
@ -43,8 +48,8 @@ function! ale_linters#haskell#argon#Handle(buffer, lines) abort
|
|||||||
|
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'filename': l:error.path,
|
\ 'filename': l:error.path,
|
||||||
\ 'lnum': str2nr(l:block.lineno),
|
\ 'lnum': l:block.lineno,
|
||||||
\ 'col': str2nr(l:block.col),
|
\ 'col': l:block.col,
|
||||||
\ 'text': l:block.name . ': cyclomatic complexity of ' . l:complexity,
|
\ 'text': l:block.name . ': cyclomatic complexity of ' . l:complexity,
|
||||||
\ 'type': l:type,
|
\ 'type': l:type,
|
||||||
\})
|
\})
|
||||||
|
Loading…
Reference in New Issue
Block a user