mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-30 16:14:30 +08:00
Add support for formatting filenames into commands, and use it to fix linting with older eslint versions.
This commit is contained in:
@@ -154,6 +154,12 @@ function! s:ApplyLinter(buffer, linter)
|
||||
let command = a:linter.command
|
||||
endif
|
||||
|
||||
if command =~# '%s'
|
||||
" If there is a '%s' in the command string, replace it with the name
|
||||
" of the file.
|
||||
let command = printf(command, shellescape(getbufinfo(a:buffer)[0].name))
|
||||
endif
|
||||
|
||||
if has('nvim')
|
||||
if a:linter.output_stream ==# 'stderr'
|
||||
" Read from stderr instead of stdout.
|
||||
|
||||
Reference in New Issue
Block a user