diff options
author | w0rp <devw0rp@gmail.com> | 2016-10-04 13:50:44 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2016-10-04 13:50:44 +0100 |
commit | 705f4232c0920a7d1e3f4b70f06fc982015a43d7 (patch) | |
tree | 4582aa4d30ebd6b49b8ce00b304beda0e291c81d /plugin | |
parent | 6269ffa0b28bce00d5e9df63ea5c5829a15dd125 (diff) | |
download | ale-705f4232c0920a7d1e3f4b70f06fc982015a43d7.zip |
Add support for formatting filenames into commands, and use it to fix linting with older eslint versions.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/ale/zmain.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index 26085b66..3cfe28db 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -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. |