2017-10-10 05:13:09 -04:00
|
|
|
Before:
|
|
|
|
runtime! ale_linters/llvm/llc.vim
|
|
|
|
|
2017-11-15 12:21:17 -05:00
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
2017-10-10 05:13:09 -04:00
|
|
|
Execute(llc handler should parse errors output for STDIN):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 7,
|
|
|
|
\ 'text': "error: value doesn't match function result type 'i32'",
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 13,
|
|
|
|
\ 'text': "error: use of undefined value '@foo'",
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#llvm#llc#HandleErrors(bufnr(''), [
|
|
|
|
\ "llc: <stdin>:10:7: error: value doesn't match function result type 'i32'",
|
|
|
|
\ 'ret i64 0',
|
|
|
|
\ ' ^',
|
|
|
|
\ '',
|
|
|
|
\ "llc: <stdin>:10:13: error: use of undefined value '@foo'",
|
|
|
|
\ 'call void @foo(i64 %0)',
|
|
|
|
\ ' ^',
|
|
|
|
\ ])
|
|
|
|
|
|
|
|
Execute(llc handler should parse errors output for some file):
|
|
|
|
call ale#test#SetFilename('test.ll')
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 7,
|
|
|
|
\ 'text': "error: value doesn't match function result type 'i32'",
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 10,
|
|
|
|
\ 'col': 13,
|
|
|
|
\ 'text': "error: use of undefined value '@foo'",
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ ],
|
|
|
|
\ ale_linters#llvm#llc#HandleErrors(bufnr(''), [
|
|
|
|
\ "llc: /path/to/test.ll:10:7: error: value doesn't match function result type 'i32'",
|
|
|
|
\ 'ret i64 0',
|
|
|
|
\ ' ^',
|
|
|
|
\ '',
|
|
|
|
\ "llc: /path/to/test.ll:10:13: error: use of undefined value '@foo'",
|
|
|
|
\ 'call void @foo(i64 %0)',
|
|
|
|
\ ' ^',
|
|
|
|
\ ])
|