Compare commits
No commits in common. "7e7201f6d7f8e55e694f21a28d39e56a10d775cb" and "c5c5364205a913cb71eeae8be47a8896f90e071b" have entirely different histories.
7e7201f6d7
...
c5c5364205
@ -78,7 +78,7 @@ call deoplete#custom#option('sources',{
|
|||||||
\ })
|
\ })
|
||||||
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
" inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
call deoplete#enable()
|
call deoplete#enable()
|
||||||
call deoplete#enable_logging('DEBUG', $HOME . '/deoplete.log')
|
|
||||||
|
|
||||||
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
let g:ghcmod_hlint_options = ['--ignore=Eta reduce $']
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ let g:ale_enabled = 1
|
|||||||
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
|
let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools'], 'c':['clang']}
|
||||||
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
|
" let g:ale_linters = {'haskell':['ghc-mod', 'hdevtools', 'argon'], 'c':['clang']}
|
||||||
" let g:ale_fixers = {
|
" let g:ale_fixers = {
|
||||||
" \ 'haskell': ['brittany'],
|
" \ 'go': ['gofmt', 'goimports'],
|
||||||
" \}
|
" \}
|
||||||
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
|
let g:ale_haskell_hdevtools_options = "-g '-Wall' -g '-Wno-orphans'"
|
||||||
let g:ale_haskell_argon_error_level = 14
|
let g:ale_haskell_argon_error_level = 14
|
||||||
|
@ -27,33 +27,28 @@ 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')
|
for l:block in l:error.blocks
|
||||||
" this cannot be formatted properly into an ALE error
|
let l:complexity = l:block.complexity
|
||||||
execute 'echom ''[argon] '' l:error.message'
|
|
||||||
return l:output
|
|
||||||
endif
|
|
||||||
for l:block in l:error.blocks
|
|
||||||
let l:complexity = l:block.complexity
|
|
||||||
|
|
||||||
if l:complexity >= ale#Var(a:buffer, 'haskell_argon_error_level')
|
if l:complexity >= ale#Var(a:buffer, 'haskell_argon_error_level')
|
||||||
let l:type = 'E'
|
let l:type = 'E'
|
||||||
let l:max_c = ale#Var(a:buffer, 'haskell_argon_error_level')
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_error_level')
|
||||||
elseif l:complexity >= ale#Var(a:buffer, 'haskell_argon_warn_level')
|
elseif l:complexity >= ale#Var(a:buffer, 'haskell_argon_warn_level')
|
||||||
let l:type = 'W'
|
let l:type = 'W'
|
||||||
let l:max_c = ale#Var(a:buffer, 'haskell_argon_warn_level')
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_warn_level')
|
||||||
else
|
else
|
||||||
let l:type = 'I'
|
let l:type = 'I'
|
||||||
let l:max_c = ale#Var(a:buffer, 'haskell_argon_info_level')
|
let l:max_c = ale#Var(a:buffer, 'haskell_argon_info_level')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'filename': l:error.path,
|
\ 'filename': l:error.path,
|
||||||
\ 'lnum': l:block.lineno,
|
\ 'lnum': str2nr(l:block.lineno),
|
||||||
\ 'col': l:block.col,
|
\ 'col': str2nr(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,
|
||||||
\})
|
\})
|
||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
|
Loading…
Reference in New Issue
Block a user