summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale.vim5
-rw-r--r--autoload/ale/assert.vim21
-rw-r--r--autoload/ale/linter.vim2
-rw-r--r--autoload/ale/node.vim5
4 files changed, 9 insertions, 24 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim
index f6c23d72..5aa5fbfc 100644
--- a/autoload/ale.vim
+++ b/autoload/ale.vim
@@ -169,11 +169,6 @@ function! ale#Var(buffer, variable_name) abort
return get(l:vars, l:full_name, g:[l:full_name])
endfunction
-" As above, but curry the arguments so only the buffer number is required.
-function! ale#VarFunc(variable_name) abort
- return {buf -> ale#Var(buf, a:variable_name)}
-endfunction
-
" Initialize a variable with a default value, if it isn't already set.
"
" Every variable name will be prefixed with 'ale_'.
diff --git a/autoload/ale/assert.vim b/autoload/ale/assert.vim
index 1b004649..6c2586a6 100644
--- a/autoload/ale/assert.vim
+++ b/autoload/ale/assert.vim
@@ -114,14 +114,6 @@ endfunction
function! ale#assert#LSPProject(expected_root) abort
let l:buffer = bufnr('')
let l:linter = s:GetLinter()
- let l:root = ale#util#GetFunction(l:linter.project_root_callback)(l:buffer)
-
- AssertEqual a:expected_root, l:root
-endfunction
-
-function! ale#assert#LSPProjectFull(expected_root) abort
- let l:buffer = bufnr('')
- let l:linter = s:GetLinter()
let l:root = ale#lsp_linter#FindProjectRoot(l:buffer, l:linter)
AssertEqual a:expected_root, l:root
@@ -130,7 +122,7 @@ endfunction
function! ale#assert#LSPAddress(expected_address) abort
let l:buffer = bufnr('')
let l:linter = s:GetLinter()
- let l:address = ale#util#GetFunction(l:linter.address_callback)(l:buffer)
+ let l:address = ale#linter#GetAddress(l:buffer, l:linter)
AssertEqual a:expected_address, l:address
endfunction
@@ -143,7 +135,6 @@ function! ale#assert#SetUpLinterTestCommands() abort
command! -nargs=+ AssertLSPConfig :call ale#assert#LSPConfig(<args>)
command! -nargs=+ AssertLSPLanguage :call ale#assert#LSPLanguage(<args>)
command! -nargs=+ AssertLSPProject :call ale#assert#LSPProject(<args>)
- command! -nargs=+ AssertLSPProjectFull :call ale#assert#LSPProjectFull(<args>)
command! -nargs=+ AssertLSPAddress :call ale#assert#LSPAddress(<args>)
endfunction
@@ -159,6 +150,12 @@ function! ale#assert#SetUpLinterTest(filetype, name) abort
let l:prefix = 'ale_' . a:filetype . '_' . a:name
let b:filter_expr = 'v:val[: len(l:prefix) - 1] is# l:prefix'
+ Save g:ale_lsp_root
+ let g:ale_lsp_root = {}
+
+ Save b:ale_lsp_root
+ unlet! b:ale_lsp_root
+
Save g:ale_c_build_dir
unlet! g:ale_c_build_dir
@@ -216,10 +213,6 @@ function! ale#assert#TearDownLinterTest() abort
delcommand AssertLSPProject
endif
- if exists(':AssertLSPProjectFull')
- delcommand AssertLSPProjectFull
- endif
-
if exists(':AssertLSPAddress')
delcommand AssertLSPAddress
endif
diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim
index 74d5c14a..4937a6d7 100644
--- a/autoload/ale/linter.vim
+++ b/autoload/ale/linter.vim
@@ -340,6 +340,8 @@ function! ale#linter#PreProcess(filetype, linter) abort
throw '`aliases` must be a List of String values'
endif
+ " TODO: Emit deprecation warnings for deprecated options later.
+
return l:obj
endfunction
diff --git a/autoload/ale/node.vim b/autoload/ale/node.vim
index 5c579c75..f75280b7 100644
--- a/autoload/ale/node.vim
+++ b/autoload/ale/node.vim
@@ -23,11 +23,6 @@ function! ale#node#FindExecutable(buffer, base_var_name, path_list) abort
return ale#Var(a:buffer, a:base_var_name . '_executable')
endfunction
-" As above, but curry the arguments so only the buffer number is required.
-function! ale#node#FindExecutableFunc(base_var_name, path_list) abort
- return {buf -> ale#node#FindExecutable(buf, a:base_var_name, a:path_list)}
-endfunction
-
" Create a executable string which executes a Node.js script command with a
" Node.js executable if needed.
"