mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-25 21:41:10 +08:00
Use message as text instead of title
`title` does not contain much information which forces to use :ALEDetail most of the time
This commit is contained in:
@@ -15,8 +15,7 @@ Execute(The elm make handler should parse general problems correctly):
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'UNKNOWN IMPORT',
|
||||
\ 'detail': "error details 1\n\nstyled details"
|
||||
\ 'text': "error details\n\nstyled details"
|
||||
\ }
|
||||
\ ],
|
||||
\ ale_linters#elm#make#Handle(347, [
|
||||
@@ -24,7 +23,7 @@ Execute(The elm make handler should parse general problems correctly):
|
||||
\ "type": "error",
|
||||
\ "path": "' . b:tmp . '/Module.elm",
|
||||
\ "title": "UNKNOWN IMPORT",
|
||||
\ "message": ["error details 1\n\n", { "string": "styled details" }]
|
||||
\ "message": ["error details\n\n", { "string": "styled details" }]
|
||||
\ }'
|
||||
\ ])
|
||||
|
||||
@@ -37,8 +36,7 @@ Execute(The elm make handler should parse compilation errors correctly):
|
||||
\ 'end_lnum': 408,
|
||||
\ 'end_col': 18,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'TYPE MISMATCH',
|
||||
\ 'detail': "error details 1\n\nstyled details"
|
||||
\ 'text': "error details 1\n\nstyled details"
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 406,
|
||||
@@ -46,8 +44,7 @@ Execute(The elm make handler should parse compilation errors correctly):
|
||||
\ 'end_lnum': 407,
|
||||
\ 'end_col': 17,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'TYPE MISMATCH',
|
||||
\ 'detail': "error details 2",
|
||||
\ 'text': "error details 2",
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 406,
|
||||
@@ -55,8 +52,7 @@ Execute(The elm make handler should parse compilation errors correctly):
|
||||
\ 'end_lnum': 406,
|
||||
\ 'end_col': 93,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'TYPE MISMATCH',
|
||||
\ 'detail': "error details 3",
|
||||
\ 'text': "error details 3",
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#elm#make#Handle(347, [
|
||||
@@ -87,18 +83,30 @@ Execute(The elm make handler should parse compilation errors correctly):
|
||||
\ }'
|
||||
\ ])
|
||||
|
||||
Execute(The elm make handler should put an error on the first line for compilation errors in imported modules):
|
||||
Execute(The elm make handler should handle errors in imported modules):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'src/Module.elm:404 - TYPE MISMATCH',
|
||||
\ 'detail': "src/Module.elm:404 -------\n\nerror details\n\nstyled details"
|
||||
\ 'text': "src/Module.elm - error details\n\nstyled details",
|
||||
\ 'detail': "src/Module.elm ----------\n\nerror details\n\nstyled details"
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "src/Module.elm:404 - error details\n\nstyled details",
|
||||
\ 'detail': "src/Module.elm:404 ----------\n\nerror details\n\nstyled details"
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#elm#make#Handle(347, [
|
||||
\ '{
|
||||
\ "type": "error",
|
||||
\ "path": "src/Module.elm",
|
||||
\ "title": "UNKNOWN IMPORT",
|
||||
\ "message": ["error details\n\n", { "string": "styled details" }]
|
||||
\ }',
|
||||
\ '{
|
||||
\ "type": "compile-errors",
|
||||
\ "errors": [
|
||||
\ {
|
||||
@@ -124,8 +132,7 @@ Execute(The elm make handler should put an error on the first line if a line can
|
||||
\ 'end_lnum': 408,
|
||||
\ 'end_col': 18,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'TYPE MISMATCH',
|
||||
\ 'detail': "error details 1 styled details"
|
||||
\ 'text': "error details 1\n\nstyled details"
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
@@ -143,13 +150,13 @@ Execute(The elm make handler should put an error on the first line if a line can
|
||||
\ "problems": [
|
||||
\ {
|
||||
\ "title": "TYPE MISMATCH",
|
||||
\ "message": ["error details 1 ", { "string": "styled details" }],
|
||||
\ "message": ["error details 1\n\n", { "string": "styled details" }],
|
||||
\ "region": { "start": { "line": 404, "column": 1 }, "end": { "line": 408, "column": 18 } }
|
||||
\ }
|
||||
\ ]
|
||||
\ }
|
||||
\ ]
|
||||
\ }',
|
||||
\ "Not JSON",
|
||||
\ "Also not JSON",
|
||||
\ 'Not JSON',
|
||||
\ 'Also not JSON',
|
||||
\ ])
|
||||
|
||||
Reference in New Issue
Block a user