2020-08-23 18:55:42 +00:00
|
|
|
Before:
|
|
|
|
Save g:ale_filename_mappings
|
|
|
|
|
|
|
|
let g:ale_filename_mappings = {}
|
|
|
|
|
2017-08-10 22:08:32 +00:00
|
|
|
After:
|
2017-08-19 20:18:27 +00:00
|
|
|
unlet! b:temp_name
|
2017-08-10 22:08:32 +00:00
|
|
|
unlet! b:other_bufnr
|
|
|
|
|
2020-08-23 18:55:42 +00:00
|
|
|
Restore
|
|
|
|
|
|
|
|
|
|
|
|
Execute(FixLocList should map filenames):
|
|
|
|
" Paths converted back into temporary filenames shouldn't be included.
|
|
|
|
let g:ale_filename_mappings = {
|
2020-08-23 19:14:08 +00:00
|
|
|
\ 'linter2': [['/xxx/', '/data/']],
|
2020-08-23 18:55:42 +00:00
|
|
|
\ 'linter1': [
|
2020-08-23 19:14:08 +00:00
|
|
|
\ ['/bar/', '/data/special/'],
|
|
|
|
\ ['/foo/', '/data/'],
|
2020-08-23 18:55:42 +00:00
|
|
|
\ [
|
2020-08-23 19:14:08 +00:00
|
|
|
\ ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h')) . '/',
|
|
|
|
\ '/x-tmp/',
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
|
|
|
\ ],
|
|
|
|
\}
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ '/foo/file.txt',
|
|
|
|
\ v:null,
|
|
|
|
\ '/bar/file.txt',
|
|
|
|
\ ],
|
|
|
|
\ map(
|
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
|
|
|
\ 'linter1',
|
|
|
|
\ 0,
|
|
|
|
\ [
|
|
|
|
\ {'text': 'x', 'lnum': 1, 'filename': '/data/file.txt'},
|
|
|
|
\ {'text': 'x', 'lnum': 1, 'filename': '/x-tmp/file.txt'},
|
|
|
|
\ {'text': 'x', 'lnum': 1, 'filename': '/data/special/file.txt'},
|
|
|
|
\ ],
|
|
|
|
\ ),
|
|
|
|
\ 'get(v:val, ''filename'', v:null)',
|
|
|
|
\ )
|
|
|
|
|
|
|
|
|
2017-02-26 14:51:22 +00:00
|
|
|
Given foo (Some file with lines to count):
|
|
|
|
foo12345678
|
|
|
|
bar12345678
|
|
|
|
baz12345678
|
|
|
|
four12345678
|
|
|
|
five12345678
|
|
|
|
six12345678
|
|
|
|
seven12345678
|
|
|
|
eight12345678
|
|
|
|
nine12345678
|
|
|
|
ten12345678
|
|
|
|
|
|
|
|
Execute(FixLocList should set all the default values correctly):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'b',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-02-26 14:51:22 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ [{'text': 'a', 'lnum': 2}, {'text': 'b', 'lnum': 2}],
|
|
|
|
\ )
|
|
|
|
|
|
|
|
Execute(FixLocList should use the values we supply):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 4,
|
|
|
|
\ 'bufnr': 10000,
|
2018-04-08 16:17:30 +00:00
|
|
|
\ 'vcol': 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ 'type': 'W',
|
|
|
|
\ 'nr': 42,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-02-26 14:51:22 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ [{
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 4,
|
|
|
|
\ 'bufnr': 10000,
|
|
|
|
\ 'vcol': 1,
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ 'nr': 42,
|
|
|
|
\ }],
|
|
|
|
\ )
|
|
|
|
|
|
|
|
Execute(FixLocList should set items with lines beyond the end to the last line):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-02-26 14:51:22 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ [{'text': 'a', 'lnum': 11}],
|
|
|
|
\ )
|
|
|
|
|
|
|
|
Execute(FixLocList should move line 0 to line 1):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-02-26 14:51:22 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ [{'text': 'a', 'lnum': 0}],
|
|
|
|
\ )
|
|
|
|
|
|
|
|
Execute(FixLocList should convert line and column numbers correctly):
|
|
|
|
" The numbers should be 10, not 8 as octals.
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 10,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-02-26 14:51:22 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-02-26 14:51:22 +00:00
|
|
|
\ [{'text': 'a', 'lnum': '010', 'col': '010'}],
|
|
|
|
\ )
|
2017-05-16 17:12:49 +00:00
|
|
|
|
2017-05-31 12:14:39 +00:00
|
|
|
Execute(FixLocList should pass on end_col values):
|
2017-05-16 17:12:49 +00:00
|
|
|
" The numbers should be 10, not 8 as octals.
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 10,
|
|
|
|
\ 'end_col': 12,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 11,
|
|
|
|
\ 'end_col': 12,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-05-16 17:12:49 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-05-16 17:12:49 +00:00
|
|
|
\ [
|
|
|
|
\ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012'},
|
|
|
|
\ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12},
|
|
|
|
\ ],
|
|
|
|
\ )
|
2017-05-20 22:32:41 +00:00
|
|
|
|
2017-05-31 12:14:39 +00:00
|
|
|
Execute(FixLocList should pass on end_lnum values):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 10,
|
|
|
|
\ 'end_lnum': 13,
|
|
|
|
\ 'end_col': 12,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 11,
|
|
|
|
\ 'end_lnum': 13,
|
|
|
|
\ 'end_col': 12,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-05-31 12:14:39 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-05-31 12:14:39 +00:00
|
|
|
\ [
|
|
|
|
\ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012', 'end_lnum': '013'},
|
|
|
|
\ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12, 'end_lnum': 13},
|
|
|
|
\ ],
|
|
|
|
\ )
|
|
|
|
|
2017-05-20 22:32:41 +00:00
|
|
|
Execute(FixLocList should allow subtypes to be set):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'sub_type': 'style',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-05-20 22:32:41 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
2017-06-13 16:53:47 +00:00
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-05-20 22:32:41 +00:00
|
|
|
\ [{'text': 'a', 'lnum': 11, 'sub_type': 'style'}],
|
|
|
|
\ )
|
2017-08-10 22:08:32 +00:00
|
|
|
|
|
|
|
Execute(FixLocList should accept filenames):
|
|
|
|
let b:other_bufnr = bufnr('/foo/bar/baz', 1)
|
|
|
|
|
|
|
|
" Make sure we actually get another buffer number, or the test is invalid.
|
|
|
|
AssertNotEqual -1, b:other_bufnr
|
|
|
|
|
|
|
|
call ale#test#SetFilename('test.txt')
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'filename': expand('%:p'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'filename': expand('%:p'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 4,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': b:other_bufnr,
|
|
|
|
\ 'filename': '/foo/bar/baz',
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 5,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': b:other_bufnr,
|
|
|
|
\ 'filename': '/foo/bar/baz',
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-08-10 22:08:32 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-08-10 22:08:32 +00:00
|
|
|
\ [
|
|
|
|
\ {'text': 'a', 'lnum': 2, 'filename': expand('%:p')},
|
|
|
|
\ {'text': 'a', 'lnum': 3, 'filename': expand('%:p')},
|
|
|
|
\ {'text': 'a', 'lnum': 4, 'filename': '/foo/bar/baz'},
|
|
|
|
\ {'text': 'a', 'lnum': 5, 'filename': '/foo/bar/baz'},
|
|
|
|
\ ],
|
|
|
|
\ )
|
2017-08-19 20:18:27 +00:00
|
|
|
|
|
|
|
Execute(FixLocList should interpret temporary filenames as being the current buffer):
|
|
|
|
let b:temp_name = tempname()
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr(''),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 3,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr(''),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-08-19 20:18:27 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr(''),
|
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-08-19 20:18:27 +00:00
|
|
|
\ [
|
|
|
|
\ {'text': 'a', 'lnum': 2, 'filename': b:temp_name},
|
2018-03-18 20:39:42 +00:00
|
|
|
\ {'text': 'a', 'lnum': 3, 'filename': substitute(b:temp_name, '\\', '/', 'g')},
|
2017-08-19 20:18:27 +00:00
|
|
|
\ ],
|
|
|
|
\ )
|
2017-11-13 23:34:00 +00:00
|
|
|
|
|
|
|
Execute(The error code should be passed on):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ 'code': 'some-code'
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2017-11-13 23:34:00 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2017-11-13 23:34:00 +00:00
|
|
|
\ [{'text': 'a', 'lnum': 11, 'code': 'some-code'}],
|
|
|
|
\ )
|
2018-04-08 16:17:30 +00:00
|
|
|
|
2018-10-29 18:28:28 +00:00
|
|
|
Execute(FixLocList should mark problems as coming from other sources if requested):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'text': 'a',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ 'from_other_source': 1,
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'text': 'b',
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'bufnr': bufnr('%'),
|
|
|
|
\ 'vcol': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'nr': -1,
|
|
|
|
\ 'linter_name': 'foobar',
|
|
|
|
\ 'from_other_source': 1,
|
|
|
|
\ },
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2018-10-29 18:28:28 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
|
|
|
\ 'foobar',
|
|
|
|
\ 1,
|
|
|
|
\ [{'text': 'a', 'lnum': 2}, {'text': 'b', 'lnum': 2}],
|
|
|
|
\ )
|
|
|
|
|
2018-04-08 16:17:30 +00:00
|
|
|
Given(A file with Japanese multi-byte text):
|
|
|
|
はじめまして!
|
|
|
|
-私はワープです。
|
|
|
|
Execute(character positions should be converted to byte positions):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 0, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 1, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 4, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 13, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 13, 'end_lnum': 1, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 1, 'bufnr': bufnr(''), 'col': 7, 'end_col': 17, 'end_lnum': 2, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
|
|
|
\ {'lnum': 2, 'bufnr': bufnr(''), 'col': 17, 'linter_name': 'foobar', 'nr': -1, 'type': 'E', 'vcol': 0, 'text': 'a'},
|
2020-08-23 18:55:42 +00:00
|
|
|
\ ],
|
2018-04-08 16:17:30 +00:00
|
|
|
\ ale#engine#FixLocList(
|
|
|
|
\ bufnr('%'),
|
|
|
|
\ 'foobar',
|
2018-10-29 18:28:28 +00:00
|
|
|
\ 0,
|
2018-04-08 16:17:30 +00:00
|
|
|
\ [
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 0, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 1, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 2, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 3, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 5, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 5, 'end_lnum': 1, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 1, 'col': 3, 'end_col': 7, 'end_lnum': 2, 'vcol': 1},
|
|
|
|
\ {'text': 'a', 'lnum': 2, 'col': 7, 'vcol': 1},
|
|
|
|
\ ],
|
|
|
|
\ )
|