2017-11-15 17:21:17 +00:00
|
|
|
Before:
|
2017-04-08 10:24:20 +00:00
|
|
|
runtime ale_linters/ruby/ruby.vim
|
2017-11-15 17:21:17 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#linter#Reset()
|
|
|
|
|
|
|
|
Execute(The ruby handler should parse lines correctly and add the column if it can):
|
2017-04-08 10:24:20 +00:00
|
|
|
" Point Error
|
|
|
|
" Warning
|
|
|
|
" Line Error
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 6,
|
|
|
|
\ 'col': 13,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'text': 'syntax error, unexpected '';'''
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 9,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ 'text': 'warning: statement not reached'
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 12,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ 'text': 'syntax error, unexpected end-of-input, expecting keyword_end'
|
|
|
|
\ }
|
|
|
|
\ ],
|
2017-04-25 17:38:02 +00:00
|
|
|
\ ale#handlers#ruby#HandleSyntaxErrors(255, [
|
2017-04-08 10:24:20 +00:00
|
|
|
\ "test.rb:6: syntax error, unexpected ';'",
|
|
|
|
\ " t = ;",
|
|
|
|
\ " ^",
|
|
|
|
\ "test.rb:9: warning: statement not reached",
|
|
|
|
\ "test.rb:12: syntax error, unexpected end-of-input, expecting keyword_end",
|
|
|
|
\ ])
|