mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 06:46:52 +08:00
Merge pull request #589 from bardzusny/ember-template-lint-handler-parsing-error
Ember-template-lint handler: properly handle template parsing errors.
This commit is contained in:
@@ -46,6 +46,33 @@ Execute(The ember-template-lint handler should parse lines correctly):
|
||||
\ ],
|
||||
\ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines)
|
||||
|
||||
Execute(The ember-template-lint handler should handle template parsing error correctly):
|
||||
let input_lines = split('{
|
||||
\ "/ember-project/app/templates/application.hbs": [
|
||||
\ {
|
||||
\ "fatal": true,
|
||||
\ "moduleId": "app/templates/application",
|
||||
\ "message": "Parse error on line 5 ...",
|
||||
\ "line": 1,
|
||||
\ "column": 1,
|
||||
\ "source": "Error: Parse error on line 5 ...",
|
||||
\ "severity": 2
|
||||
\ }
|
||||
\ ]
|
||||
\ }', '\n')
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'bufnr': 347,
|
||||
\ 'lnum': 1,
|
||||
\ 'col': 1,
|
||||
\ 'text': 'Parse error on line 5 ...',
|
||||
\ 'type': 'E',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines)
|
||||
|
||||
Execute(The ember-template-lint handler should handle no lint errors/warnings):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user