diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-01 20:23:41 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-01 20:23:41 +0100 |
commit | 5091e2de452e493678e236c92b2ca5bb7bc29653 (patch) | |
tree | 4fa1e0a06568a6592ce82e0cdc9660d08cc52cdb /autoload | |
parent | 638ca4208232ab7abe46efa5052403e58dcfc35a (diff) | |
download | ale-5091e2de452e493678e236c92b2ca5bb7bc29653.zip |
Get fixer tests to work on Windows
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/fixers/autopep8.vim | 2 | ||||
-rw-r--r-- | autoload/ale/fixers/isort.vim | 2 | ||||
-rw-r--r-- | autoload/ale/fixers/standard.vim | 4 | ||||
-rw-r--r-- | autoload/ale/handlers/eslint.vim | 4 |
4 files changed, 9 insertions, 3 deletions
diff --git a/autoload/ale/fixers/autopep8.vim b/autoload/ale/fixers/autopep8.vim index e2dd7bfe..e0e6205f 100644 --- a/autoload/ale/fixers/autopep8.vim +++ b/autoload/ale/fixers/autopep8.vim @@ -12,7 +12,7 @@ function! ale#fixers#autopep8#Fix(buffer) abort \ ['autopep8'], \) - if !executable(l:executable) + if !ale#python#IsExecutable(l:executable) return 0 endif diff --git a/autoload/ale/fixers/isort.vim b/autoload/ale/fixers/isort.vim index 00d968f4..ddd95611 100644 --- a/autoload/ale/fixers/isort.vim +++ b/autoload/ale/fixers/isort.vim @@ -11,7 +11,7 @@ function! ale#fixers#isort#Fix(buffer) abort \ ['isort'], \) - if !executable(l:executable) + if !ale#python#IsExecutable(l:executable) return 0 endif diff --git a/autoload/ale/fixers/standard.vim b/autoload/ale/fixers/standard.vim index 443560ed..c998cfd0 100644 --- a/autoload/ale/fixers/standard.vim +++ b/autoload/ale/fixers/standard.vim @@ -1,6 +1,10 @@ " Author: Sumner Evans <sumner.evans98@gmail.com> " Description: Fixing files with Standard. +call ale#Set('javascript_standard_executable', 'standard') +call ale#Set('javascript_standard_use_global', 0) +call ale#Set('javascript_standard_options', '') + function! ale#fixers#standard#GetExecutable(buffer) abort return ale#node#FindExecutable(a:buffer, 'javascript_standard', [ \ 'node_modules/standard/bin/cmd.js', diff --git a/autoload/ale/handlers/eslint.vim b/autoload/ale/handlers/eslint.vim index b08e0ea7..3397ab5e 100644 --- a/autoload/ale/handlers/eslint.vim +++ b/autoload/ale/handlers/eslint.vim @@ -1,6 +1,8 @@ " Author: w0rp <devw0rp@gmail.com> " Description: Functions for working with eslint, for checking or fixing files. +let s:sep = has('win32') ? '\' : '/' + call ale#Set('javascript_eslint_options', '') call ale#Set('javascript_eslint_executable', 'eslint') call ale#Set('javascript_eslint_use_global', 0) @@ -15,7 +17,7 @@ function! ale#handlers#eslint#FindConfig(buffer) abort \ '.eslintrc.json', \ '.eslintrc', \] - let l:config = ale#path#Simplify(l:path . '/' . l:basename) + let l:config = ale#path#Simplify(join([l:path, l:basename], s:sep)) if filereadable(l:config) return l:config |