mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-17 17:55:56 +08:00
Merge pull request #2040 from leamingrad/jshint_filename
Pass the filename of the current file into jshint
This commit is contained in:
@@ -18,7 +18,7 @@ function! ale_linters#javascript#jshint#GetCommand(buffer) abort
|
|||||||
let l:command .= ' --config ' . ale#Escape(l:jshint_config)
|
let l:command .= ' --config ' . ale#Escape(l:jshint_config)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:command .= ' -'
|
let l:command .= ' --filename %s -'
|
||||||
|
|
||||||
return l:command
|
return l:command
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
14
test/command_callback/test_jshint_command_callback.vader
Normal file
14
test/command_callback/test_jshint_command_callback.vader
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpLinterTest('javascript', 'jshint')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
|
Execute(The default command should be correct):
|
||||||
|
|
||||||
|
AssertLinter 'jshint', '''jshint'' --reporter unix --extract auto --filename %s -'
|
||||||
|
|
||||||
|
Execute(Setting a config location should add the config parameter):
|
||||||
|
let g:ale_jshint_config_loc = '/some/file'
|
||||||
|
|
||||||
|
AssertLinter 'jshint', '''jshint'' --reporter unix --extract auto --config ''/some/file'' --filename %s -'
|
||||||
Reference in New Issue
Block a user