#502 Parse more undefined symbol errors
This commit is contained in:
		
							parent
							
								
									8e70dc14f2
								
							
						
					
					
						commit
						c2a0847f99
					
				@ -86,7 +86,7 @@ function! ale_linters#java#javac#Handle(buffer, lines) abort
 | 
				
			|||||||
    " Main.java:16: error: ';' expected
 | 
					    " Main.java:16: error: ';' expected
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let l:pattern = '\v^.*:(\d+): (.+):(.+)$'
 | 
					    let l:pattern = '\v^.*:(\d+): (.+):(.+)$'
 | 
				
			||||||
    let l:symbol_pattern = '\v^ +symbol: *(class) +([^ ]+)'
 | 
					    let l:symbol_pattern = '\v^ +symbol: *(class|method) +([^ ]+)'
 | 
				
			||||||
    let l:output = []
 | 
					    let l:output = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:symbol_pattern])
 | 
					    for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:symbol_pattern])
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,11 @@ Execute(The javac handler should handle cannot find symbol errors):
 | 
				
			|||||||
  \     'text': 'warning: some warning',
 | 
					  \     'text': 'warning: some warning',
 | 
				
			||||||
  \     'type': 'W',
 | 
					  \     'type': 'W',
 | 
				
			||||||
  \   },
 | 
					  \   },
 | 
				
			||||||
 | 
					  \   {
 | 
				
			||||||
 | 
					  \     'lnum': 42,
 | 
				
			||||||
 | 
					  \     'text': 'error: cannot find symbol: bar()',
 | 
				
			||||||
 | 
					  \     'type': 'E',
 | 
				
			||||||
 | 
					  \   },
 | 
				
			||||||
  \ ],
 | 
					  \ ],
 | 
				
			||||||
  \ ale_linters#java#javac#Handle(347, [
 | 
					  \ ale_linters#java#javac#Handle(347, [
 | 
				
			||||||
  \   '/tmp/vLPr4Q5/33/foo.java:1: error: some error',
 | 
					  \   '/tmp/vLPr4Q5/33/foo.java:1: error: some error',
 | 
				
			||||||
@ -41,5 +46,9 @@ Execute(The javac handler should handle cannot find symbol errors):
 | 
				
			|||||||
  \   '  symbol:   class BadName2',
 | 
					  \   '  symbol:   class BadName2',
 | 
				
			||||||
  \   '  location: class Bar',
 | 
					  \   '  location: class Bar',
 | 
				
			||||||
  \   '/tmp/vLPr4Q5/33/foo.java:37: warning: some warning',
 | 
					  \   '/tmp/vLPr4Q5/33/foo.java:37: warning: some warning',
 | 
				
			||||||
  \   '4 errors',
 | 
					  \   '/tmp/vLPr4Q5/264/foo.java:42: error: cannot find symbol',
 | 
				
			||||||
 | 
					  \   '      this.bar();',
 | 
				
			||||||
 | 
					  \   '          ^',
 | 
				
			||||||
 | 
					  \   '  symbol: method bar()',
 | 
				
			||||||
 | 
					  \   '5 errors',
 | 
				
			||||||
  \ ])
 | 
					  \ ])
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user