summaryrefslogtreecommitdiff
path: root/test/handler
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 /test/handler
parentbf1ac8e822835ac2b0e1173e1e014c773b8e51a6 (diff)
downloadale-3dd2d9deddd68edd24bbe3f6b089a10c302c961e.zip
Fix Credo message types (#1963)
* Add more Credo message types * Add tests
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_credo_handler.vader26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/handler/test_credo_handler.vader b/test/handler/test_credo_handler.vader
index 5eb0e967..1fd54bb5 100644
--- a/test/handler/test_credo_handler.vader
+++ b/test/handler/test_credo_handler.vader
@@ -10,20 +10,44 @@ Execute(The credo handler should parse lines correctly):
\ {
\ 'bufnr': 347,
\ 'lnum': 1,
+ \ 'col': 24,
+ \ 'text': 'This code can be refactored',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 1,
\ 'col': 4,
\ 'text': 'There is no whitespace around parentheses/brackets most of the time, but here there is.',
- \ 'type': 'E',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 5,
+ \ 'col': 21,
+ \ 'text': 'TODO comment',
+ \ 'type': 'I',
\ },
\ {
\ 'bufnr': 347,
\ 'lnum': 26,
\ 'col': 0,
\ 'text': 'If/else blocks should not have a negated condition in `if`.',
+ \ 'type': 'I',
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 15,
+ \ 'col': 1,
+ \ 'text': 'Warning in the code',
\ 'type': 'W',
\ },
\ ],
\ ale_linters#elixir#credo#Handle(347, [
\ 'This line should be ignored completely',
+ \ 'lib/my_code/test.ex:1:24: F: This code can be refactored',
\ 'lib/filename.ex:1:4: C: There is no whitespace around parentheses/brackets most of the time, but here there is.',
+ \ 'lib/my_code/test.ex:5:21: D: TODO comment',
\ 'lib/phoenix/channel.ex:26: R: If/else blocks should not have a negated condition in `if`.',
+ \ 'lib/my_code/test.ex:15:1: W: Warning in the code',
\ ])