summaryrefslogtreecommitdiff
path: root/ale_linters/ruby
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-09 15:50:12 +0100
committerw0rp <devw0rp@gmail.com>2017-07-09 15:50:12 +0100
commit025f3407d68da712253e24a11b9acd0c7ae84ca8 (patch)
tree242e3f72255c10b251e7a39dfe20bfb9497a4a3d /ale_linters/ruby
parentab0e76dbd50dbe5bae08817baa56432889335b99 (diff)
downloadale-025f3407d68da712253e24a11b9acd0c7ae84ca8.zip
Simplify ale_linters#ruby#rubocop#GetType
Diffstat (limited to 'ale_linters/ruby')
-rw-r--r--ale_linters/ruby/rubocop.vim17
1 files changed, 5 insertions, 12 deletions
diff --git a/ale_linters/ruby/rubocop.vim b/ale_linters/ruby/rubocop.vim
index 1756f450..30aadd0c 100644
--- a/ale_linters/ruby/rubocop.vim
+++ b/ale_linters/ruby/rubocop.vim
@@ -37,20 +37,13 @@ function! ale_linters#ruby#rubocop#Handle(buffer, lines) abort
endfunction
function! ale_linters#ruby#rubocop#GetType(severity) abort
- if a:severity ==? 'refactor'
+ if a:severity ==? 'convention'
+ \|| a:severity ==? 'warning'
+ \|| a:severity ==? 'refactor'
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
+
+ return 'E'
endfunction
call ale#linter#Define('ruby', {