summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-07 16:19:40 +0100
committerw0rp <devw0rp@gmail.com>2017-05-07 16:19:40 +0100
commit05bd4f591c3d9f53dff8beadb5468ed7a301fad4 (patch)
treeacd998a687ccb55e08f4780f89fed69cd5cc6a5c
parent4228c503f4e89c50606bf225958363ceb349fecd (diff)
downloadale-05bd4f591c3d9f53dff8beadb5468ed7a301fad4.zip
Escape JavaScript executables in commands
-rw-r--r--ale_linters/javascript/eslint.vim2
-rw-r--r--ale_linters/javascript/flow.vim2
-rw-r--r--ale_linters/javascript/jshint.vim2
-rw-r--r--ale_linters/javascript/standard.vim2
-rw-r--r--ale_linters/javascript/xo.vim2
5 files changed, 5 insertions, 5 deletions
diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim
index 7d78eed8..67b65839 100644
--- a/ale_linters/javascript/eslint.vim
+++ b/ale_linters/javascript/eslint.vim
@@ -34,7 +34,7 @@ function! ale_linters#javascript#eslint#GetExecutable(buffer) abort
endfunction
function! ale_linters#javascript#eslint#GetCommand(buffer) abort
- return ale_linters#javascript#eslint#GetExecutable(a:buffer)
+ return fnameescape(ale_linters#javascript#eslint#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'javascript_eslint_options')
\ . ' -f unix --stdin --stdin-filename %s'
endfunction
diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim
index 24c7bca5..14f65126 100644
--- a/ale_linters/javascript/flow.vim
+++ b/ale_linters/javascript/flow.vim
@@ -27,7 +27,7 @@ function! ale_linters#javascript#flow#GetCommand(buffer) abort
return ''
endif
- return ale_linters#javascript#flow#GetExecutable(a:buffer)
+ return fnameescape(ale_linters#javascript#flow#GetExecutable(a:buffer))
\ . ' check-contents --respect-pragma --json --from ale %s'
endfunction
diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim
index ddb8619f..657b0ff5 100644
--- a/ale_linters/javascript/jshint.vim
+++ b/ale_linters/javascript/jshint.vim
@@ -27,7 +27,7 @@ function! ale_linters#javascript#jshint#GetCommand(buffer) abort
\ get(g:, 'ale_jshint_config_loc', '')
\)
- let l:command = ale_linters#javascript#jshint#GetExecutable(a:buffer)
+ let l:command = fnameescape(ale_linters#javascript#jshint#GetExecutable(a:buffer))
let l:command .= ' --reporter unix --extract auto'
if !empty(l:jshint_config)
diff --git a/ale_linters/javascript/standard.vim b/ale_linters/javascript/standard.vim
index 895d9951..1b82823c 100644
--- a/ale_linters/javascript/standard.vim
+++ b/ale_linters/javascript/standard.vim
@@ -23,7 +23,7 @@ function! ale_linters#javascript#standard#GetExecutable(buffer) abort
endfunction
function! ale_linters#javascript#standard#GetCommand(buffer) abort
- return ale_linters#javascript#standard#GetExecutable(a:buffer)
+ return fnameescape(ale_linters#javascript#standard#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'javascript_standard_options')
\ . ' --stdin %s'
endfunction
diff --git a/ale_linters/javascript/xo.vim b/ale_linters/javascript/xo.vim
index 0276b551..a3e9f999 100644
--- a/ale_linters/javascript/xo.vim
+++ b/ale_linters/javascript/xo.vim
@@ -23,7 +23,7 @@ function! ale_linters#javascript#xo#GetExecutable(buffer) abort
endfunction
function! ale_linters#javascript#xo#GetCommand(buffer) abort
- return ale_linters#javascript#xo#GetExecutable(a:buffer)
+ return fnameescape(ale_linters#javascript#xo#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'javascript_xo_options')
\ . ' --reporter unix --stdin --stdin-filename %s'
endfunction