2017-08-26 16:23:20 +00:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/vim/vint.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
2017-04-11 19:32:57 +00:00
|
|
|
|
2017-08-26 16:23:20 +00:00
|
|
|
Execute(The vint handler should parse error messages correctly):
|
2017-04-11 19:32:57 +00:00
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'col': 1,
|
|
|
|
\ 'text': 'Use scriptencoding when multibyte char exists (see :help :script encoding)',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 17,
|
2017-08-26 16:23:20 +00:00
|
|
|
\ 'end_col': 18,
|
2017-04-24 22:00:43 +00:00
|
|
|
\ 'text': 'Use robust operators ''==#'' or ''==?'' instead of ''=='' (see Google VimScript Style Guide (Matching))',
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 8,
|
2017-08-26 16:23:20 +00:00
|
|
|
\ 'end_col': 15,
|
2017-04-24 22:00:43 +00:00
|
|
|
\ 'text': 'Make the scope explicit like ''l:filename'' (see Anti-pattern of vimrc (Scope of identifier))',
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 7,
|
|
|
|
\ 'col': 8,
|
2017-08-26 16:23:20 +00:00
|
|
|
\ 'end_col': 15,
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'text': 'Undefined variable: filename (see :help E738)',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
2017-08-26 16:23:20 +00:00
|
|
|
\ {
|
|
|
|
\ 'lnum': 8,
|
|
|
|
\ 'col': 11,
|
|
|
|
\ 'end_col': 16,
|
|
|
|
\ 'text': 'E128: Function name must start with a capital or contain a colon: foobar (see ynkdir/vim-vimlparser)',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 9,
|
|
|
|
\ 'col': 12,
|
|
|
|
\ 'end_col': 13,
|
|
|
|
\ 'text': 'Use robust operators ''=~#'' or ''=~?'' instead of ''=~'' (see Google VimScript Style Guide (Matching))',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
2017-04-11 19:32:57 +00:00
|
|
|
\ ],
|
2017-08-26 16:23:20 +00:00
|
|
|
\ ale_linters#vim#vint#Handle(bufnr(''), [
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'gcc.vim:1:1: warning: Use scriptencoding when multibyte char exists (see :help :script encoding)',
|
|
|
|
\ 'gcc.vim:3:17: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))',
|
|
|
|
\ 'gcc.vim:3:8: style_problem: Make the scope explicit like `l:filename` (see Anti-pattern of vimrc (Scope of identifier))',
|
|
|
|
\ 'gcc.vim:7:8: warning: Undefined variable: filename (see :help E738)',
|
2017-08-26 16:23:20 +00:00
|
|
|
\ 'gcc.vim:8:11: error: E128: Function name must start with a capital or contain a colon: foobar (see ynkdir/vim-vimlparser)',
|
|
|
|
\ 'gcc.vim:9:12: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))',
|
2017-04-11 19:32:57 +00:00
|
|
|
\ ])
|