mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Add Ruby MRI linter (#453)
* Added ruby mri linter * Added to the list of supported linters * Async and now with 4 spaces * Vader tests for ruby * Match style choices * Vader test for the Ruby handler now works and passes
This commit is contained in:
39
test/handler/test_ruby_handler.vader
Normal file
39
test/handler/test_ruby_handler.vader
Normal file
@@ -0,0 +1,39 @@
|
||||
Execute(The ruby handler should parse lines correctly and add the column if it can):
|
||||
runtime ale_linters/ruby/ruby.vim
|
||||
" Point Error
|
||||
" Warning
|
||||
" Line Error
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 6,
|
||||
\ 'bufnr': 255,
|
||||
\ 'col': 13,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'syntax error, unexpected '';'''
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 9,
|
||||
\ 'bufnr': 255,
|
||||
\ 'col': 0,
|
||||
\ 'type': 'W',
|
||||
\ 'text': 'warning: statement not reached'
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 12,
|
||||
\ 'bufnr': 255,
|
||||
\ 'col': 0,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'syntax error, unexpected end-of-input, expecting keyword_end'
|
||||
\ }
|
||||
\ ],
|
||||
\ ale_linters#ruby#ruby#Handle(255, [
|
||||
\ "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",
|
||||
\ ])
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
Reference in New Issue
Block a user