Close #542 - Add an option for disabling running locally installed executables by default
This commit is contained in:
@@ -51,6 +51,7 @@ let s:global_variable_list = [
|
||||
\ 'ale_sign_warning',
|
||||
\ 'ale_statusline_format',
|
||||
\ 'ale_type_map',
|
||||
\ 'ale_use_global_executables',
|
||||
\ 'ale_warn_about_trailing_blank_lines',
|
||||
\ 'ale_warn_about_trailing_whitespace',
|
||||
\]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing files with autopep8.
|
||||
|
||||
call ale#Set('python_autopep8_executable', 'autopep8')
|
||||
call ale#Set('python_autopep8_use_global', 0)
|
||||
call ale#Set('python_autopep8_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('python_autopep8_options', '')
|
||||
|
||||
function! ale#fixers#autopep8#Fix(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing Python files with black.
|
||||
"
|
||||
call ale#Set('python_black_executable', 'black')
|
||||
call ale#Set('python_black_use_global', 0)
|
||||
call ale#Set('python_black_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('python_black_options', '')
|
||||
|
||||
function! ale#fixers#black#Fix(buffer) abort
|
||||
|
||||
@@ -3,7 +3,7 @@ scriptencoding utf-8
|
||||
" Description: Fixing C/C++ files with clang-format.
|
||||
|
||||
call ale#Set('c_clangformat_executable', 'clang-format')
|
||||
call ale#Set('c_clangformat_use_global', 0)
|
||||
call ale#Set('c_clangformat_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('c_clangformat_options', '')
|
||||
|
||||
function! ale#fixers#clangformat#GetExecutable(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Integration of elm-format with ALE.
|
||||
|
||||
call ale#Set('elm_format_executable', 'elm-format')
|
||||
call ale#Set('elm_format_use_global', 0)
|
||||
call ale#Set('elm_format_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('elm_format_options', '--yes')
|
||||
|
||||
function! ale#fixers#elm_format#GetExecutable(buffer) abort
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
call ale#Set('json_fixjson_executable', 'fixjson')
|
||||
call ale#Set('json_fixjson_options', '')
|
||||
call ale#Set('json_fixjson_use_global', 0)
|
||||
call ale#Set('json_fixjson_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#fixjson#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'json_fixjson', [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Integration of Google-java-format with ALE.
|
||||
|
||||
call ale#Set('google_java_format_executable', 'google-java-format')
|
||||
call ale#Set('google_java_format_use_global', 0)
|
||||
call ale#Set('google_java_format_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('google_java_format_options', '')
|
||||
|
||||
function! ale#fixers#google_java_format#Fix(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing Python imports with isort.
|
||||
|
||||
call ale#Set('python_isort_executable', 'isort')
|
||||
call ale#Set('python_isort_use_global', 0)
|
||||
call ale#Set('python_isort_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#isort#Fix(buffer) abort
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing files with php-cs-fixer.
|
||||
|
||||
call ale#Set('php_cs_fixer_executable', 'php-cs-fixer')
|
||||
call ale#Set('php_cs_fixer_use_global', 0)
|
||||
call ale#Set('php_cs_fixer_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('php_cs_fixer_options', '')
|
||||
|
||||
function! ale#fixers#php_cs_fixer#GetExecutable(buffer) abort
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
call ale#Set('php_phpcbf_standard', '')
|
||||
call ale#Set('php_phpcbf_executable', 'phpcbf')
|
||||
call ale#Set('php_phpcbf_use_global', 0)
|
||||
call ale#Set('php_phpcbf_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#phpcbf#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'php_phpcbf', [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Description: Integration of Prettier with ALE.
|
||||
|
||||
call ale#Set('javascript_prettier_executable', 'prettier')
|
||||
call ale#Set('javascript_prettier_use_global', 0)
|
||||
call ale#Set('javascript_prettier_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('javascript_prettier_options', '')
|
||||
|
||||
function! ale#fixers#prettier#GetExecutable(buffer) abort
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
function! ale#fixers#prettier_eslint#SetOptionDefaults() abort
|
||||
call ale#Set('javascript_prettier_eslint_executable', 'prettier-eslint')
|
||||
call ale#Set('javascript_prettier_eslint_use_global', 0)
|
||||
call ale#Set('javascript_prettier_eslint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('javascript_prettier_eslint_options', '')
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Integration of Prettier Standard with ALE.
|
||||
|
||||
call ale#Set('javascript_prettier_standard_executable', 'prettier-standard')
|
||||
call ale#Set('javascript_prettier_standard_use_global', 0)
|
||||
call ale#Set('javascript_prettier_standard_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('javascript_prettier_standard_options', '')
|
||||
|
||||
function! ale#fixers#prettier_standard#GetExecutable(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" 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_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('javascript_standard_options', '')
|
||||
|
||||
function! ale#fixers#standard#GetExecutable(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing files with stylelint.
|
||||
|
||||
call ale#Set('stylelint_executable', 'stylelint')
|
||||
call ale#Set('stylelint_use_global', 0)
|
||||
call ale#Set('stylelint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#stylelint#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'stylelint', [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Integration of SwiftFormat with ALE.
|
||||
|
||||
call ale#Set('swift_swiftformat_executable', 'swiftformat')
|
||||
call ale#Set('swift_swiftformat_use_global', 0)
|
||||
call ale#Set('swift_swiftformat_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('swift_swiftformat_options', '')
|
||||
|
||||
function! ale#fixers#swiftformat#GetExecutable(buffer) abort
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: Fixing Python files with yapf.
|
||||
|
||||
call ale#Set('python_yapf_executable', 'yapf')
|
||||
call ale#Set('python_yapf_use_global', 0)
|
||||
call ale#Set('python_yapf_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#yapf#Fix(buffer) abort
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
|
||||
@@ -5,7 +5,7 @@ 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)
|
||||
call ale#Set('javascript_eslint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('javascript_eslint_suppress_eslintignore', 0)
|
||||
call ale#Set('javascript_eslint_suppress_missing_config', 0)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Description: textlint, a proofreading tool (https://textlint.github.io/)
|
||||
|
||||
call ale#Set('textlint_executable', 'textlint')
|
||||
call ale#Set('textlint_use_global', 0)
|
||||
call ale#Set('textlint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('textlint_options', '')
|
||||
|
||||
function! ale#handlers#textlint#GetExecutable(buffer) abort
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
function! ale#handlers#writegood#ResetOptions() abort
|
||||
call ale#Set('writegood_options', '')
|
||||
call ale#Set('writegood_executable', 'write-good')
|
||||
call ale#Set('writegood_use_global', 0)
|
||||
call ale#Set('writegood_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
endfunction
|
||||
|
||||
" Reset the options so the tests can test how they are set.
|
||||
|
||||
Reference in New Issue
Block a user