2017-05-04 22:19:58 +00:00
|
|
|
Before:
|
|
|
|
runtime ale_linters/java/javac.vim
|
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The javac handler should handle cannot find symbol errors):
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 1,
|
|
|
|
\ 'text': 'error: some error',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 2,
|
2017-06-19 10:45:09 +00:00
|
|
|
\ 'col': 5,
|
2017-05-04 22:19:58 +00:00
|
|
|
\ 'text': 'error: cannot find symbol: BadName',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 34,
|
2017-06-19 10:45:09 +00:00
|
|
|
\ 'col': 5,
|
2017-05-04 22:19:58 +00:00
|
|
|
\ 'text': 'error: cannot find symbol: BadName2',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 37,
|
|
|
|
\ 'text': 'warning: some warning',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
2017-05-04 22:34:52 +00:00
|
|
|
\ {
|
|
|
|
\ 'lnum': 42,
|
2017-06-19 10:45:09 +00:00
|
|
|
\ 'col': 11,
|
2017-05-04 22:34:52 +00:00
|
|
|
\ 'text': 'error: cannot find symbol: bar()',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
2017-05-04 22:19:58 +00:00
|
|
|
\ ],
|
|
|
|
\ ale_linters#java#javac#Handle(347, [
|
|
|
|
\ '/tmp/vLPr4Q5/33/foo.java:1: error: some error',
|
|
|
|
\ '/tmp/vLPr4Q5/33/foo.java:2: error: cannot find symbol',
|
|
|
|
\ ' BadName foo() {',
|
|
|
|
\ ' ^',
|
|
|
|
\ ' symbol: class BadName',
|
|
|
|
\ ' location: class Bar',
|
|
|
|
\ '/tmp/vLPr4Q5/33/foo.java:34: error: cannot find symbol',
|
|
|
|
\ ' BadName2 foo() {',
|
|
|
|
\ ' ^',
|
|
|
|
\ ' symbol: class BadName2',
|
|
|
|
\ ' location: class Bar',
|
|
|
|
\ '/tmp/vLPr4Q5/33/foo.java:37: warning: some warning',
|
2017-05-04 22:34:52 +00:00
|
|
|
\ '/tmp/vLPr4Q5/264/foo.java:42: error: cannot find symbol',
|
|
|
|
\ ' this.bar();',
|
|
|
|
\ ' ^',
|
|
|
|
\ ' symbol: method bar()',
|
|
|
|
\ '5 errors',
|
2017-05-04 22:19:58 +00:00
|
|
|
\ ])
|