summaryrefslogtreecommitdiff
path: root/ale_linters/elixir
diff options
context:
space:
mode:
authorFilip Vavera <FilipVavera@sgiath.net>2018-10-11 11:00:10 +0200
committerw0rp <w0rp@users.noreply.github.com>2018-10-11 10:00:10 +0100
commit3dd2d9deddd68edd24bbe3f6b089a10c302c961e (patch)
tree96695ec26f2a7068934744fc29aafb1028731731 /ale_linters/elixir
parentbf1ac8e822835ac2b0e1173e1e014c773b8e51a6 (diff)
downloadale-3dd2d9deddd68edd24bbe3f6b089a10c302c961e.zip
Fix Credo message types (#1963)
* Add more Credo message types * Add tests
Diffstat (limited to 'ale_linters/elixir')
-rw-r--r--ale_linters/elixir/credo.vim14
1 files changed, 11 insertions, 3 deletions
diff --git a/ale_linters/elixir/credo.vim b/ale_linters/elixir/credo.vim
index 6e949677..d778471c 100644
--- a/ale_linters/elixir/credo.vim
+++ b/ale_linters/elixir/credo.vim
@@ -11,10 +11,18 @@ function! ale_linters#elixir#credo#Handle(buffer, lines) abort
let l:type = l:match[3]
let l:text = l:match[4]
- if l:type is# 'C'
- let l:type = 'E'
- elseif l:type is# 'R'
+ " Refactoring opportunities
+ if l:type is# 'F'
+ let l:type = 'W'
+ " Consistency
+ elseif l:type is# 'C'
let l:type = 'W'
+ " Software Design
+ elseif l:type is# 'D'
+ let l:type = 'I'
+ " Code Readability
+ elseif l:type is# 'R'
+ let l:type = 'I'
endif
call add(l:output, {