diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-17 23:29:02 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-17 23:29:02 +0100 |
commit | e237add9fdec64c80ed57f383e2b73464fb4b43d (patch) | |
tree | c7a958526e3048c3457359de435fd8ee83ab07b6 /ale_linters | |
parent | 6c762237cea0dd29fc95d3cbbb9787213f581ef3 (diff) | |
download | ale-e237add9fdec64c80ed57f383e2b73464fb4b43d.zip |
Move path functions to their own file
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/coffee/coffee.vim | 2 | ||||
-rw-r--r-- | ale_linters/coffee/coffeelint.vim | 2 | ||||
-rw-r--r-- | ale_linters/css/csslint.vim | 2 | ||||
-rw-r--r-- | ale_linters/css/stylelint.vim | 2 | ||||
-rw-r--r-- | ale_linters/d/dmd.vim | 2 | ||||
-rw-r--r-- | ale_linters/elm/make.vim | 2 | ||||
-rw-r--r-- | ale_linters/handlebars/embertemplatelint.vim | 2 | ||||
-rw-r--r-- | ale_linters/html/htmlhint.vim | 2 | ||||
-rw-r--r-- | ale_linters/javascript/eslint.vim | 4 | ||||
-rw-r--r-- | ale_linters/javascript/flow.vim | 4 | ||||
-rw-r--r-- | ale_linters/javascript/jshint.vim | 4 | ||||
-rw-r--r-- | ale_linters/javascript/standard.vim | 2 | ||||
-rw-r--r-- | ale_linters/javascript/xo.vim | 2 | ||||
-rw-r--r-- | ale_linters/python/mypy.vim | 2 | ||||
-rw-r--r-- | ale_linters/rust/cargo.vim | 2 | ||||
-rw-r--r-- | ale_linters/rust/rustc.vim | 2 | ||||
-rw-r--r-- | ale_linters/sass/stylelint.vim | 2 | ||||
-rw-r--r-- | ale_linters/scss/stylelint.vim | 2 | ||||
-rw-r--r-- | ale_linters/tex/chktex.vim | 2 | ||||
-rw-r--r-- | ale_linters/typescript/tslint.vim | 4 |
20 files changed, 24 insertions, 24 deletions
diff --git a/ale_linters/coffee/coffee.vim b/ale_linters/coffee/coffee.vim index f263a163..f2539281 100644 --- a/ale_linters/coffee/coffee.vim +++ b/ale_linters/coffee/coffee.vim @@ -2,7 +2,7 @@ " Description: Coffee for checking coffee files function! ale_linters#coffee#coffee#GetExecutable(buffer) abort - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/coffee', \ 'coffee' diff --git a/ale_linters/coffee/coffeelint.vim b/ale_linters/coffee/coffeelint.vim index 614f45aa..bac86821 100644 --- a/ale_linters/coffee/coffeelint.vim +++ b/ale_linters/coffee/coffeelint.vim @@ -2,7 +2,7 @@ " Description: coffeelint linter for coffeescript files function! ale_linters#coffee#coffeelint#GetExecutable(buffer) abort - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/coffeelint', \ 'coffeelint' diff --git a/ale_linters/css/csslint.vim b/ale_linters/css/csslint.vim index 6b0956ee..641e9c3e 100644 --- a/ale_linters/css/csslint.vim +++ b/ale_linters/css/csslint.vim @@ -2,7 +2,7 @@ " Description: This file adds support for checking CSS code with csslint. function! ale_linters#css#csslint#GetCommand(buffer) abort - let l:csslintrc = ale#util#FindNearestFile(a:buffer, '.csslintrc') + let l:csslintrc = ale#path#FindNearestFile(a:buffer, '.csslintrc') let l:config_option = !empty(l:csslintrc) \ ? '--config=' . fnameescape(l:csslintrc) \ : '' diff --git a/ale_linters/css/stylelint.vim b/ale_linters/css/stylelint.vim index ffda0498..8c1c3be1 100644 --- a/ale_linters/css/stylelint.vim +++ b/ale_linters/css/stylelint.vim @@ -14,7 +14,7 @@ function! ale_linters#css#stylelint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'css_stylelint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/stylelint', \ ale#Var(a:buffer, 'css_stylelint_executable') diff --git a/ale_linters/d/dmd.vim b/ale_linters/d/dmd.vim index 45565d0c..c6f8f209 100644 --- a/ale_linters/d/dmd.vim +++ b/ale_linters/d/dmd.vim @@ -5,7 +5,7 @@ function! s:FindDUBConfig(buffer) abort " Find a DUB configuration file in ancestor paths. " The most DUB-specific names will be tried first. for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json'] - let l:dub_file = ale#util#FindNearestFile(a:buffer, l:possible_filename) + let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename) if !empty(l:dub_file) return l:dub_file diff --git a/ale_linters/elm/make.vim b/ale_linters/elm/make.vim index a8ae4b1a..32f824e0 100644 --- a/ale_linters/elm/make.vim +++ b/ale_linters/elm/make.vim @@ -38,7 +38,7 @@ endfunction " Return the command to execute the linter in the projects directory. " If it doesn't, then this will fail when imports are needed. function! ale_linters#elm#make#GetCommand(buffer) abort - let l:elm_package = ale#util#FindNearestFile(a:buffer, 'elm-package.json') + let l:elm_package = ale#path#FindNearestFile(a:buffer, 'elm-package.json') if empty(l:elm_package) let l:dir_set_cmd = '' else diff --git a/ale_linters/handlebars/embertemplatelint.vim b/ale_linters/handlebars/embertemplatelint.vim index bfec27aa..91dda70a 100644 --- a/ale_linters/handlebars/embertemplatelint.vim +++ b/ale_linters/handlebars/embertemplatelint.vim @@ -12,7 +12,7 @@ function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'handlebars_embertemplatelint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/ember-template-lint', \ ale#Var(a:buffer, 'handlebars_embertemplatelint_executable') diff --git a/ale_linters/html/htmlhint.vim b/ale_linters/html/htmlhint.vim index b0172f68..2edae372 100644 --- a/ale_linters/html/htmlhint.vim +++ b/ale_linters/html/htmlhint.vim @@ -11,7 +11,7 @@ function! ale_linters#html#htmlhint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'html_htmlhint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/htmlhint', \ ale#Var(a:buffer, 'html_htmlhint_executable') diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index 2a65e301..459e4e5d 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -16,7 +16,7 @@ function! ale_linters#javascript#eslint#GetExecutable(buffer) abort endif " Look for the kinds of paths that create-react-app generates first. - let l:executable = ale#util#ResolveLocalPath( + let l:executable = ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/eslint/bin/eslint.js', \ '' @@ -26,7 +26,7 @@ function! ale_linters#javascript#eslint#GetExecutable(buffer) abort return l:executable endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/eslint', \ ale#Var(a:buffer, 'javascript_eslint_executable') diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim index 90d6f420..24c7bca5 100644 --- a/ale_linters/javascript/flow.vim +++ b/ale_linters/javascript/flow.vim @@ -12,7 +12,7 @@ function! ale_linters#javascript#flow#GetExecutable(buffer) abort return ale#Var(a:buffer, 'javascript_flow_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/flow', \ ale#Var(a:buffer, 'javascript_flow_executable') @@ -20,7 +20,7 @@ function! ale_linters#javascript#flow#GetExecutable(buffer) abort endfunction function! ale_linters#javascript#flow#GetCommand(buffer) abort - let l:flow_config = ale#util#FindNearestFile(a:buffer, '.flowconfig') + let l:flow_config = ale#path#FindNearestFile(a:buffer, '.flowconfig') if empty(l:flow_config) " Don't run Flow if we can't find a .flowconfig file. diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim index 506b26da..6835eeb0 100644 --- a/ale_linters/javascript/jshint.vim +++ b/ale_linters/javascript/jshint.vim @@ -12,7 +12,7 @@ function! ale_linters#javascript#jshint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'javascript_jshint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/jshint', \ ale#Var(a:buffer, 'javascript_jshint_executable') @@ -21,7 +21,7 @@ endfunction function! ale_linters#javascript#jshint#GetCommand(buffer) abort " Search for a local JShint config locaation, and default to a global one. - let l:jshint_config = ale#util#ResolveLocalPath( + let l:jshint_config = ale#path#ResolveLocalPath( \ a:buffer, \ '.jshintrc', \ get(g:, 'ale_jshint_config_loc', '') diff --git a/ale_linters/javascript/standard.vim b/ale_linters/javascript/standard.vim index c43b83c5..8809b07e 100644 --- a/ale_linters/javascript/standard.vim +++ b/ale_linters/javascript/standard.vim @@ -15,7 +15,7 @@ function! ale_linters#javascript#standard#GetExecutable(buffer) abort return ale#Var(a:buffer, 'javascript_standard_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/standard', \ ale#Var(a:buffer, 'javascript_standard_executable') diff --git a/ale_linters/javascript/xo.vim b/ale_linters/javascript/xo.vim index e27f6f33..dc71f0d3 100644 --- a/ale_linters/javascript/xo.vim +++ b/ale_linters/javascript/xo.vim @@ -15,7 +15,7 @@ function! ale_linters#javascript#xo#GetExecutable(buffer) abort return g:ale_javascript_xo_executable endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/xo', \ g:ale_javascript_xo_executable diff --git a/ale_linters/python/mypy.vim b/ale_linters/python/mypy.vim index d0a891ea..257a1d39 100644 --- a/ale_linters/python/mypy.vim +++ b/ale_linters/python/mypy.vim @@ -4,7 +4,7 @@ let g:ale_python_mypy_options = get(g:, 'ale_python_mypy_options', '') function! ale_linters#python#mypy#GetCommand(buffer) abort - let l:automatic_stubs_dir = ale#util#FindNearestDirectory(a:buffer, 'stubs') + let l:automatic_stubs_dir = ale#path#FindNearestDirectory(a:buffer, 'stubs') " TODO: Add Windows support let l:automatic_stubs_command = (has('unix') && !empty(l:automatic_stubs_dir)) \ ? 'MYPYPATH=' . l:automatic_stubs_dir . ' ' diff --git a/ale_linters/rust/cargo.vim b/ale_linters/rust/cargo.vim index 8dbc0bd0..32c09a58 100644 --- a/ale_linters/rust/cargo.vim +++ b/ale_linters/rust/cargo.vim @@ -4,7 +4,7 @@ let g:ale_rust_cargo_use_check = get(g:, 'ale_rust_cargo_use_check', 0) function! ale_linters#rust#cargo#GetCargoExecutable(bufnr) abort - if ale#util#FindNearestFile(a:bufnr, 'Cargo.toml') !=# '' + if ale#path#FindNearestFile(a:bufnr, 'Cargo.toml') !=# '' return 'cargo' else " if there is no Cargo.toml file, we don't use cargo even if it exists, diff --git a/ale_linters/rust/rustc.vim b/ale_linters/rust/rustc.vim index 1d080b98..73c99cd9 100644 --- a/ale_linters/rust/rustc.vim +++ b/ale_linters/rust/rustc.vim @@ -5,7 +5,7 @@ function! ale_linters#rust#rustc#RustcCommand(buffer_number) abort " Try to guess the library search path. If the project is managed by cargo, " it's usually <project root>/target/debug/deps/ or " <project root>/target/release/deps/ - let l:cargo_file = ale#util#FindNearestFile(a:buffer_number, 'Cargo.toml') + let l:cargo_file = ale#path#FindNearestFile(a:buffer_number, 'Cargo.toml') if l:cargo_file !=# '' let l:project_root = fnamemodify(l:cargo_file, ':h') diff --git a/ale_linters/sass/stylelint.vim b/ale_linters/sass/stylelint.vim index a481f280..a148b879 100644 --- a/ale_linters/sass/stylelint.vim +++ b/ale_linters/sass/stylelint.vim @@ -11,7 +11,7 @@ function! ale_linters#sass#stylelint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'sass_stylelint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/stylelint', \ ale#Var(a:buffer, 'sass_stylelint_executable') diff --git a/ale_linters/scss/stylelint.vim b/ale_linters/scss/stylelint.vim index 2e5d0270..edb4abb5 100644 --- a/ale_linters/scss/stylelint.vim +++ b/ale_linters/scss/stylelint.vim @@ -11,7 +11,7 @@ function! ale_linters#scss#stylelint#GetExecutable(buffer) abort return ale#Var(a:buffer, 'scss_stylelint_executable') endif - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/stylelint', \ ale#Var(a:buffer, 'scss_stylelint_executable') diff --git a/ale_linters/tex/chktex.vim b/ale_linters/tex/chktex.vim index da5cc668..8ecb3773 100644 --- a/ale_linters/tex/chktex.vim +++ b/ale_linters/tex/chktex.vim @@ -9,7 +9,7 @@ let g:ale_tex_chktex_options = function! ale_linters#tex#chktex#GetCommand(buffer) abort " Check for optional .chktexrc - let l:chktex_config = ale#util#FindNearestFile( + let l:chktex_config = ale#path#FindNearestFile( \ a:buffer, \ '.chktexrc') diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index a77011e5..081ad42b 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -8,7 +8,7 @@ let g:ale_typescript_tslint_config_path = \ get(g:, 'ale_typescript_tslint_config_path', '') function! ale_linters#typescript#tslint#GetExecutable(buffer) abort - return ale#util#ResolveLocalPath( + return ale#path#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/tslint', \ ale#Var(a:buffer, 'typescript_tslint_executable') @@ -50,7 +50,7 @@ function! ale_linters#typescript#tslint#Handle(buffer, lines) abort endfunction function! ale_linters#typescript#tslint#BuildLintCommand(buffer) abort - let l:tslint_config_path = ale#util#ResolveLocalPath( + let l:tslint_config_path = ale#path#ResolveLocalPath( \ a:buffer, \ 'tslint.json', \ ale#Var(a:buffer, 'typescript_tslint_config_path') |