mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 07:16:53 +08:00
Get fixer tests to work on Windows
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user