diff options
author | rhysd <lin90162@yahoo.co.jp> | 2019-03-30 13:53:18 +0900 |
---|---|---|
committer | rhysd <lin90162@yahoo.co.jp> | 2019-03-30 15:29:17 +0900 |
commit | 6a29641872f78c3f565418f3f754070a4b1ebe1e (patch) | |
tree | 15ac8103e48c5e4dd53f6acbfbe5c11339f018c3 /test/test_ignoring_linters.vader | |
parent | 89273b65b8de9d3d428e7b1f5c0c347938f5a863 (diff) | |
download | ale-6a29641872f78c3f565418f3f754070a4b1ebe1e.zip |
Add g:ale_disable_lsp and b:ale_disable_lsp to disable linters powered by LSP
Diffstat (limited to 'test/test_ignoring_linters.vader')
-rw-r--r-- | test/test_ignoring_linters.vader | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/test_ignoring_linters.vader b/test/test_ignoring_linters.vader index 32eae954..2d9c67de 100644 --- a/test/test_ignoring_linters.vader +++ b/test/test_ignoring_linters.vader @@ -30,6 +30,7 @@ Execute(Exclude should ignore some invalid values): \ {'name': 'linter3', 'aliases': []}, \ ], \ 'foo', + \ 0, \ ) AssertEqual \ [ @@ -45,6 +46,7 @@ Execute(Exclude should ignore some invalid values): \ {'name': 'linter3', 'aliases': []}, \ ], \ 0, + \ 0, \ ) AssertEqual \ [ @@ -60,6 +62,7 @@ Execute(Exclude should ignore some invalid values): \ {'name': 'linter3', 'aliases': []}, \ ], \ v:null, + \ 0, \ ) Execute(Exclude should handle Lists): @@ -75,6 +78,7 @@ Execute(Exclude should handle Lists): \ {'name': 'linter3', 'aliases': []}, \ ], \ ['linter1', 'alias1'], + \ 0, \ ) Execute(Exclude should handle Dictionaries): @@ -90,11 +94,51 @@ Execute(Exclude should handle Dictionaries): \ {'name': 'linter3', 'aliases': []}, \ ], \ {'foo': ['linter1'], 'bar': ['alias1']}, + \ 0, + \ ) + +Execute(Exclude should filter LSP linters when g:ale_disable_lsp is set to 1): + let g:ale_disable_lsp = 1 + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo', + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ {'name': 'linter3', 'aliases': [], 'lsp': 'stdio'}, + \ ], + \ [], + \ 1, + \ ) + +Execute(Exclude should filter LSP linters when b:ale_disable_lsp is set to 1): + let b:ale_disable_lsp = 1 + AssertEqual + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ ], + \ ale#engine#ignore#Exclude( + \ 'foo', + \ [ + \ {'name': 'linter1', 'aliases': [], 'lsp': ''}, + \ {'name': 'linter2', 'aliases': []}, + \ {'name': 'linter3', 'aliases': [], 'lsp': 'stdio'}, + \ ], + \ [], + \ 1, \ ) Before: Save g:ale_linters_ignore Save g:ale_buffer_info + Save g:ale_disable_lsp + + let g:ale_disable_lsp = 0 let g:linters = [] let g:loclist = [] @@ -127,6 +171,7 @@ After: unlet! b:ale_linters_ignore unlet! b:ale_quitting unlet! b:ale_save_event_fired + unlet! b:ale_disable_lsp unlet! g:linters unlet! g:loclist unlet! g:lsp_message |