mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
Use different reporter to support older versions of jscs (#737)
* Use different reporter to support older versions of jscs * Add test and make more consistent with other code * Add documentation for jscs * Add more test coverage
This commit is contained in:
25
test/command_callback/test_jscs_command_callback.vader
Normal file
25
test/command_callback/test_jscs_command_callback.vader
Normal file
@@ -0,0 +1,25 @@
|
||||
Before:
|
||||
runtime ale_linters/javascript/jscs.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
let g:ale_javascript_jscs_executable = 'jscs'
|
||||
|
||||
Execute(Should return the correct default values):
|
||||
AssertEqual
|
||||
\ 'jscs',
|
||||
\ ale_linters#javascript#jscs#GetExecutable(bufnr(''))
|
||||
AssertEqual
|
||||
\ '''jscs'' --reporter inline --no-colors -',
|
||||
\ ale_linters#javascript#jscs#GetCommand(bufnr(''))
|
||||
|
||||
|
||||
Execute(Should allow using a custom executable):
|
||||
let g:ale_javascript_jscs_executable = 'foobar'
|
||||
|
||||
AssertEqual
|
||||
\ 'foobar',
|
||||
\ ale_linters#javascript#jscs#GetExecutable(bufnr(''))
|
||||
AssertEqual
|
||||
\ '''foobar'' --reporter inline --no-colors -',
|
||||
\ ale_linters#javascript#jscs#GetCommand(bufnr(''))
|
||||
Reference in New Issue
Block a user