summaryrefslogtreecommitdiff
path: root/test/test_credo_handler.vader
blob: 73f98ba0d9c9cefe7c1bbcbf05ee904f678c323a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Execute(The credo handler should parse lines correctly):
  runtime ale_linters/elixir/credo.vim

  AssertEqual
  \ [
  \   {
  \     'bufnr': 347,
  \     'lnum': 1,
  \     'col': 4,
  \     'text': 'There is no whitespace around parentheses/brackets most of the time, but here there is.',
  \     'type': 'E',
  \   },
  \   {
  \     'bufnr': 347,
  \     'lnum': 26,
  \     'col': 0,
  \     'text': 'If/else blocks should not have a negated condition in `if`.',
  \     'type': 'W',
  \   },
  \ ],
  \ ale_linters#elixir#credo#Handle(347, [
  \   'This line should be ignored completely',
  \   'lib/filename.ex:1:4: C: There is no whitespace around parentheses/brackets most of the time, but here there is.',
  \   'lib/phoenix/channel.ex:26: R: If/else blocks should not have a negated condition in `if`.',
  \ ])

After:
  call ale#linter#Reset()