diff options
author | w0rp <devw0rp@gmail.com> | 2016-10-11 23:52:13 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-10-11 23:52:13 +0100 |
commit | 5e0f33615e8ac0dd8b9ec2a46c41d7cd7f2387df (patch) | |
tree | 18ca0270a98e5ae65dfcef945e69df75dfcdeb48 | |
parent | 1d2405f2bc9dc6485c7e0f57f06e316f8d3c855e (diff) | |
download | ale-5e0f33615e8ac0dd8b9ec2a46c41d7cd7f2387df.zip |
Add a test for aliases too.
-rw-r--r-- | test/test_ale_linter_get.vader | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_ale_linter_get.vader b/test/test_ale_linter_get.vader index 80691a59..a6207c01 100644 --- a/test/test_ale_linter_get.vader +++ b/test/test_ale_linter_get.vader @@ -1,8 +1,10 @@ Before: let g:ale_linters = {} + let g:ale_linter_aliases = {} After: let g:ale_linters = {} + let g:ale_linter_aliases = {} Execute (Defaults should be correct): AssertEqual [{'output_stream': 'stdout', 'name': 'eslint', 'executable': 'eslint', 'command': 'eslint -f unix --stdin --stdin-filename %s', 'callback': 'ale_linters#javascript#eslint#Handle'}, {'output_stream': 'stdout', 'name': 'jscs', 'executable': 'jscs', 'command': 'jscs -r unix -n -', 'callback': 'ale#handlers#HandleUnixFormatAsError'}, {'output_stream': 'stdout', 'name': 'jshint', 'executable': 'jshint', 'command_callback': 'ale_linters#javascript#jshint#GetCommand', 'callback': 'ale#handlers#HandleUnixFormatAsError'}], ale#linter#Get('javascript') @@ -10,3 +12,8 @@ Execute (Defaults should be correct): Execute (You should be able to select only a few linters): let g:ale_linters = {'javascript': ['eslint']} AssertEqual [{'output_stream': 'stdout', 'name': 'eslint', 'executable': 'eslint', 'command': 'eslint -f unix --stdin --stdin-filename %s', 'callback': 'ale_linters#javascript#eslint#Handle'}], ale#linter#Get('javascript') + +Execute (You should be able to alias filetypes and select different linters): + let g:ale_linter_aliases = {'foobar': 'javascript'} + let g:ale_linters = {'javascript': ['eslint'], 'foobar': ['jshint']} + AssertEqual [{'output_stream': 'stdout', 'name': 'jshint', 'executable': 'jshint', 'command_callback': 'ale_linters#javascript#jshint#GetCommand', 'callback': 'ale#handlers#HandleUnixFormatAsError'}], ale#linter#Get('foobar') |