mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Add support for dart analyze (#3825)
This commit is contained in:
28
test/handler/test_dart_analyze_handler.vader
Normal file
28
test/handler/test_dart_analyze_handler.vader
Normal file
@@ -0,0 +1,28 @@
|
||||
Before:
|
||||
runtime ale_linters/dart/dart_analyze.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(Basic problems should be parsed correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'expected_token: Expected to find ''}''',
|
||||
\ 'lnum': 5,
|
||||
\ 'col': 1,
|
||||
\ },
|
||||
\ {
|
||||
\ 'type': 'W',
|
||||
\ 'text': 'invalid_assignment: A value of type ''String'' can''t be assigned to a variable of type ''int''',
|
||||
\ 'lnum': 2,
|
||||
\ 'col': 16,
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#dart#dart_analyze#Handle(bufnr(''), [
|
||||
\ 'Analyzing main.dart...',
|
||||
\ ' error - main.dart:5:1 - Expected to find ''}'' - expected_token',
|
||||
\ ' warning - main.dart:2:16 - A value of type ''String'' can''t be assigned to a variable of type ''int'' - invalid_assignment',
|
||||
\ '1 error and 1 warning found.',
|
||||
\ ])
|
||||
Reference in New Issue
Block a user