2017-11-15 12:21:17 -05:00
|
|
|
Before:
|
2017-02-22 18:33:05 -05:00
|
|
|
runtime ale_linters/elixir/credo.vim
|
|
|
|
|
2017-11-15 12:21:17 -05:00
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The credo handler should parse lines correctly):
|
2017-02-22 18:33:05 -05:00
|
|
|
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`.',
|
|
|
|
\ ])
|