Simplify ale_linters#ruby#rubocop#GetType
This commit is contained in:
parent
ab0e76dbd5
commit
025f3407d6
@ -37,20 +37,13 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#ruby#rubocop#GetType(severity) abort
|
function! ale_linters#ruby#rubocop#GetType(severity) abort
|
||||||
if a:severity ==? 'refactor'
|
if a:severity ==? 'convention'
|
||||||
|
\|| a:severity ==? 'warning'
|
||||||
|
\|| a:severity ==? 'refactor'
|
||||||
return 'W'
|
return 'W'
|
||||||
elseif a:severity ==? 'convention'
|
|
||||||
return 'W'
|
|
||||||
elseif a:severity ==? 'warning'
|
|
||||||
return 'W'
|
|
||||||
elseif a:severity ==? 'error'
|
|
||||||
return 'E'
|
|
||||||
elseif a:severity ==? 'fatal'
|
|
||||||
return 'E'
|
|
||||||
else
|
|
||||||
echo 'Rubocop offense type unrecognized by ALE: ' + a:severity
|
|
||||||
return ''
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
return 'E'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('ruby', {
|
call ale#linter#Define('ruby', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user