2021-01-02 06:42:38 +00:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/vala/vala_lint.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The Vala-Lint handler should parse lines correctly):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 18,
|
|
|
|
\ 'col': 18,
|
|
|
|
\ 'text': 'Expected space before paren',
|
|
|
|
\ 'code': 'space-before-paren',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 64,
|
|
|
|
\ 'col': 37,
|
|
|
|
\ 'text': 'Expected space before paren',
|
|
|
|
\ 'code': 'space-before-paren',
|
2021-01-04 07:45:12 +00:00
|
|
|
\ 'type': 'W',
|
2021-01-02 06:42:38 +00:00
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 73,
|
|
|
|
\ 'col': 37,
|
|
|
|
\ 'text': 'Expected space before paren',
|
|
|
|
\ 'code': 'space-before-paren',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#vala#vala_lint#Handle(bufnr(''), [
|
|
|
|
\ 'Application.vala',
|
|
|
|
\ ' 18.18 error Expected space before paren space-before-paren',
|
2021-01-04 07:45:12 +00:00
|
|
|
\ ' 64.37 warn Expected space before paren space-before-paren',
|
|
|
|
\ ' 73.37 error Expected space before paren space-before-paren',
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(The Vala-Lint handler should ignore unknown error types):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 73,
|
|
|
|
\ 'col': 37,
|
|
|
|
\ 'text': 'Expected space before paren',
|
|
|
|
\ 'code': 'space-before-paren',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#vala#vala_lint#Handle(bufnr(''), [
|
|
|
|
\ 'Application.vala',
|
|
|
|
\ ' 18.18 test Expected space before paren space-before-paren',
|
2021-01-02 06:42:38 +00:00
|
|
|
\ ' 73.37 error Expected space before paren space-before-paren',
|
|
|
|
\ ])
|