2017-11-16 04:36:53 -05:00
|
|
|
Before:
|
|
|
|
runtime! ale_linters/markdown/redpen.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(redpen handler should handle errors output):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
2017-11-17 01:21:54 -05:00
|
|
|
\ 'col': 10,
|
2017-11-16 05:28:30 -05:00
|
|
|
\ 'end_lnum': 1,
|
|
|
|
\ 'end_col': 15,
|
2017-11-16 04:36:53 -05:00
|
|
|
\ 'text': 'Found possibly misspelled word "plugin". (Spelling)',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'col': 1,
|
|
|
|
\ 'text': 'Found possibly misspelled word "NeoVim". (Spelling)',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ ],
|
2017-11-17 01:21:18 -05:00
|
|
|
\ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), [
|
2017-11-16 04:36:53 -05:00
|
|
|
\ '[',
|
|
|
|
\ ' {',
|
|
|
|
\ ' "document": "test.md",',
|
|
|
|
\ ' "errors": [',
|
|
|
|
\ ' {',
|
|
|
|
\ ' "sentence": "ALE is a plugin for providing linting in NeoVim and Vim 8 while you edit your text files.",',
|
|
|
|
\ ' "endPosition": {',
|
|
|
|
\ ' "offset": 15,',
|
|
|
|
\ ' "lineNum": 1',
|
|
|
|
\ ' },',
|
|
|
|
\ ' "validator": "Spelling",',
|
|
|
|
\ ' "lineNum": 1,',
|
|
|
|
\ ' "sentenceStartColumnNum": 0,',
|
|
|
|
\ ' "message": "Found possibly misspelled word \"plugin\".",',
|
|
|
|
\ ' "startPosition": {',
|
|
|
|
\ ' "offset": 9,',
|
|
|
|
\ ' "lineNum": 1',
|
|
|
|
\ ' }',
|
|
|
|
\ ' },',
|
|
|
|
\ ' {',
|
|
|
|
\ ' "sentence": "ALE is a plugin for providing linting in NeoVim and Vim 8 while you edit your text files.",',
|
|
|
|
\ ' "validator": "Spelling",',
|
|
|
|
\ ' "lineNum": 1,',
|
|
|
|
\ ' "sentenceStartColumnNum": 0,',
|
2017-11-16 05:42:51 -05:00
|
|
|
\ ' "message": "Found possibly misspelled word \"NeoVim\"."',
|
2017-11-16 04:36:53 -05:00
|
|
|
\ ' }',
|
|
|
|
\ ' ]',
|
|
|
|
\ ' }',
|
|
|
|
\ ']',
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(redpen handler should no error output):
|
|
|
|
AssertEqual
|
|
|
|
\ [],
|
2017-11-17 01:21:18 -05:00
|
|
|
\ ale#handlers#redpen#HandleRedpenOutput(bufnr(''), [
|
2017-11-16 04:36:53 -05:00
|
|
|
\ '[',
|
|
|
|
\ ' {',
|
|
|
|
\ ' "document": "test.md",',
|
|
|
|
\ ' "errors": []',
|
|
|
|
\ ' }',
|
|
|
|
\ ']',
|
|
|
|
\ ])
|