mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-16 01:07:06 +08:00
Allow the user to remove warnings from completions
This commit is contained in:
@@ -29,6 +29,51 @@ Execute(TypeScript completions responses should be parsed correctly):
|
||||
\ ],
|
||||
\})
|
||||
|
||||
Execute(TypeScript completions responses should include warnings):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'word': 'foo',
|
||||
\ 'source': '/path/to/foo.ts',
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'bar',
|
||||
\ 'source': '',
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'baz',
|
||||
\ 'source': '',
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#completion#ParseTSServerCompletions({
|
||||
\ 'body': [
|
||||
\ {'name': 'foo', 'source': '/path/to/foo.ts'},
|
||||
\ {'name': 'bar', 'kind': 'warning'},
|
||||
\ {'name': 'baz'},
|
||||
\ ],
|
||||
\})
|
||||
|
||||
Execute(TypeScript completions responses should not include warnings if excluded):
|
||||
let g:ale_completion_tsserver_remove_warnings = 1
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'word': 'foo',
|
||||
\ 'source': '/path/to/foo.ts',
|
||||
\ },
|
||||
\ {
|
||||
\ 'word': 'baz',
|
||||
\ 'source': '',
|
||||
\ }
|
||||
\ ],
|
||||
\ ale#completion#ParseTSServerCompletions({
|
||||
\ 'body': [
|
||||
\ {'name': 'foo', 'source': '/path/to/foo.ts'},
|
||||
\ {'name': 'bar', 'kind': 'warning'},
|
||||
\ {'name': 'baz'},
|
||||
\ ],
|
||||
\})
|
||||
|
||||
Execute(TypeScript completion details responses should be parsed correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user