Fix an ale:linters bug, and add a test for it.
This commit is contained in:
parent
78bcf96e34
commit
1d2405f2bc
2 changed files with 13 additions and 1 deletions
12
test/test_ale_linter_get.vader
Normal file
12
test/test_ale_linter_get.vader
Normal file
|
@ -0,0 +1,12 @@
|
|||
Before:
|
||||
let g:ale_linters = {}
|
||||
|
||||
After:
|
||||
let g:ale_linters = {}
|
||||
|
||||
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')
|
||||
|
||||
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')
|
Loading…
Add table
Add a link
Reference in a new issue