Updated plugins
This commit is contained in:
parent
1d42b63013
commit
f50b2142bc
356 changed files with 6183 additions and 3837 deletions
|
@ -12,7 +12,7 @@ function! ale_linters#ada#gcc#GetCommand(buffer) abort
|
||||||
" the .ali file may be created even if no code generation is attempted.
|
" the .ali file may be created even if no code generation is attempted.
|
||||||
" The output file name must match the source file name (except for the
|
" The output file name must match the source file name (except for the
|
||||||
" extension), so here we cannot use the null file as output.
|
" extension), so here we cannot use the null file as output.
|
||||||
let l:tmp_dir = fnamemodify(ale#engine#CreateDirectory(a:buffer), ':p')
|
let l:tmp_dir = fnamemodify(ale#command#CreateDirectory(a:buffer), ':p')
|
||||||
let l:out_file = l:tmp_dir . fnamemodify(bufname(a:buffer), ':t:r') . '.o'
|
let l:out_file = l:tmp_dir . fnamemodify(bufname(a:buffer), ':t:r') . '.o'
|
||||||
|
|
||||||
" -gnatc: Check syntax and semantics only (no code generation attempted)
|
" -gnatc: Check syntax and semantics only (no code generation attempted)
|
||||||
|
@ -48,7 +48,7 @@ endfunction
|
||||||
call ale#linter#Define('ada', {
|
call ale#linter#Define('ada', {
|
||||||
\ 'name': 'gcc',
|
\ 'name': 'gcc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('ada_gcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'ada_gcc_executable')},
|
||||||
\ 'command_callback': 'ale_linters#ada#gcc#GetCommand',
|
\ 'command': function('ale_linters#ada#gcc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#ada#gcc#Handle',
|
\ 'callback': 'ale_linters#ada#gcc#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -50,7 +50,7 @@ endfunction
|
||||||
call ale#linter#Define('ansible', {
|
call ale#linter#Define('ansible', {
|
||||||
\ 'name': 'ansible_lint',
|
\ 'name': 'ansible_lint',
|
||||||
\ 'aliases': ['ansible', 'ansible-lint'],
|
\ 'aliases': ['ansible', 'ansible-lint'],
|
||||||
\ 'executable_callback': 'ale_linters#ansible#ansible_lint#GetExecutable',
|
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
|
||||||
\ 'command': '%e -p %t',
|
\ 'command': '%e -p %t',
|
||||||
\ 'callback': 'ale_linters#ansible#ansible_lint#Handle',
|
\ 'callback': 'ale_linters#ansible#ansible_lint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
" Author: Johannes Wienke <languitar@semipol.de>
|
" Author: Johannes Wienke <languitar@semipol.de>
|
||||||
" Description: alex for asciidoc files
|
" Description: alex for asciidoc files
|
||||||
|
|
||||||
call ale#linter#Define('help', {
|
call ale#handlers#alex#DefineLinter('asciidoc', '--text')
|
||||||
\ 'name': 'alex',
|
|
||||||
\ 'executable': 'alex',
|
|
||||||
\ 'command': 'alex %s -t',
|
|
||||||
\ 'output_stream': 'stderr',
|
|
||||||
\ 'callback': 'ale#handlers#alex#Handle',
|
|
||||||
\ 'lint_file': 1,
|
|
||||||
\})
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ endfunction
|
||||||
call ale#linter#Define('asm', {
|
call ale#linter#Define('asm', {
|
||||||
\ 'name': 'gcc',
|
\ 'name': 'gcc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('asm_gcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'asm_gcc_executable')},
|
||||||
\ 'command_callback': 'ale_linters#asm#gcc#GetCommand',
|
\ 'command': function('ale_linters#asm#gcc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#asm#gcc#Handle',
|
\ 'callback': 'ale_linters#asm#gcc#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -15,8 +15,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('awk', {
|
call ale#linter#Define('awk', {
|
||||||
\ 'name': 'gawk',
|
\ 'name': 'gawk',
|
||||||
\ 'executable_callback': ale#VarFunc('awk_gawk_executable'),
|
\ 'executable': {b -> ale#Var(b, 'awk_gawk_executable')},
|
||||||
\ 'command_callback': 'ale_linters#awk#gawk#GetCommand',
|
\ 'command': function('ale_linters#awk#gawk#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#gawk#HandleGawkFormat',
|
\ 'callback': 'ale#handlers#gawk#HandleGawkFormat',
|
||||||
\ 'output_stream': 'both'
|
\ 'output_stream': 'both'
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -57,6 +57,7 @@ function! ale_linters#bib#bibclean#Handle(buffer, lines) abort
|
||||||
\ 'text': l:msg,
|
\ 'text': l:msg,
|
||||||
\ 'type': l:type
|
\ 'type': l:type
|
||||||
\})
|
\})
|
||||||
|
|
||||||
let l:msg = ''
|
let l:msg = ''
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -67,8 +68,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('bib', {
|
call ale#linter#Define('bib', {
|
||||||
\ 'name': 'bibclean',
|
\ 'name': 'bibclean',
|
||||||
\ 'executable_callback': ale#VarFunc('bib_bibclean_executable'),
|
\ 'executable': {b -> ale#Var(b, 'bib_bibclean_executable')},
|
||||||
\ 'command_callback': 'ale_linters#bib#bibclean#GetCommand',
|
\ 'command': function('ale_linters#bib#bibclean#GetCommand'),
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'callback': 'ale_linters#bib#bibclean#Handle',
|
\ 'callback': 'ale_linters#bib#bibclean#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -7,8 +7,8 @@ call ale#Set('c_ccls_init_options', {})
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'ccls',
|
\ 'name': 'ccls',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('c_ccls_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_ccls_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale#handlers#ccls#GetProjectRoot',
|
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
|
||||||
\ 'initialization_options_callback':ale#VarFunc('c_ccls_init_options'),
|
\ 'initialization_options': {b -> ale#Var(b, 'c_ccls_init_options')},
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -18,7 +18,7 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'clang',
|
\ 'name': 'clang',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('c_clang_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_clang_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||||
\ {'callback': 'ale_linters#c#clang#GetCommand'}
|
\ {'callback': 'ale_linters#c#clang#GetCommand'}
|
||||||
|
|
|
@ -17,7 +17,7 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'clangd',
|
\ 'name': 'clangd',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('c_clangd_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_clangd_executable')},
|
||||||
\ 'command_callback': 'ale_linters#c#clangd#GetCommand',
|
\ 'command': function('ale_linters#c#clangd#GetCommand'),
|
||||||
\ 'project_root_callback': 'ale_linters#c#clangd#GetProjectRoot',
|
\ 'project_root': function('ale_linters#c#clangd#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -35,8 +35,8 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'clangtidy',
|
\ 'name': 'clangtidy',
|
||||||
\ 'output_stream': 'stdout',
|
\ 'output_stream': 'stdout',
|
||||||
\ 'executable_callback': ale#VarFunc('c_clangtidy_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_clangtidy_executable')},
|
||||||
\ 'command_callback': 'ale_linters#c#clangtidy#GetCommand',
|
\ 'command': function('ale_linters#c#clangtidy#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -28,7 +28,7 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'cppcheck',
|
\ 'name': 'cppcheck',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'executable_callback': ale#VarFunc('c_cppcheck_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_cppcheck_executable')},
|
||||||
\ 'command_callback': 'ale_linters#c#cppcheck#GetCommand',
|
\ 'command': function('ale_linters#c#cppcheck#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
|
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -21,8 +21,8 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'cquery',
|
\ 'name': 'cquery',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('c_cquery_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_cquery_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale_linters#c#cquery#GetProjectRoot',
|
\ 'project_root': function('ale_linters#c#cquery#GetProjectRoot'),
|
||||||
\ 'initialization_options_callback': 'ale_linters#c#cquery#GetInitializationOptions',
|
\ 'initialization_options': function('ale_linters#c#cquery#GetInitializationOptions'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -19,7 +19,7 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'flawfinder',
|
\ 'name': 'flawfinder',
|
||||||
\ 'output_stream': 'stdout',
|
\ 'output_stream': 'stdout',
|
||||||
\ 'executable_callback': ale#VarFunc('c_flawfinder_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_flawfinder_executable')},
|
||||||
\ 'command_callback': 'ale_linters#c#flawfinder#GetCommand',
|
\ 'command': function('ale_linters#c#flawfinder#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
|
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -18,7 +18,7 @@ endfunction
|
||||||
call ale#linter#Define('c', {
|
call ale#linter#Define('c', {
|
||||||
\ 'name': 'gcc',
|
\ 'name': 'gcc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('c_gcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'c_gcc_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||||
\ {'callback': 'ale_linters#c#gcc#GetCommand'}
|
\ {'callback': 'ale_linters#c#gcc#GetCommand'}
|
||||||
|
|
|
@ -34,8 +34,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('chef', {
|
call ale#linter#Define('chef', {
|
||||||
\ 'name': 'foodcritic',
|
\ 'name': 'foodcritic',
|
||||||
\ 'executable_callback': ale#VarFunc('chef_foodcritic_executable'),
|
\ 'executable': {b -> ale#Var(b, 'chef_foodcritic_executable')},
|
||||||
\ 'command_callback': 'ale_linters#chef#foodcritic#GetCommand',
|
\ 'command': function('ale_linters#chef#foodcritic#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#chef#foodcritic#Handle',
|
\ 'callback': 'ale_linters#chef#foodcritic#Handle',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -18,7 +18,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('cmake', {
|
call ale#linter#Define('cmake', {
|
||||||
\ 'name': 'cmakelint',
|
\ 'name': 'cmakelint',
|
||||||
\ 'executable_callback': 'ale_linters#cmake#cmakelint#Executable',
|
\ 'executable': function('ale_linters#cmake#cmakelint#Executable'),
|
||||||
\ 'command_callback': 'ale_linters#cmake#cmakelint#Command',
|
\ 'command': function('ale_linters#cmake#cmakelint#Command'),
|
||||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -16,8 +16,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('coffee', {
|
call ale#linter#Define('coffee', {
|
||||||
\ 'name': 'coffee',
|
\ 'name': 'coffee',
|
||||||
\ 'executable_callback': 'ale_linters#coffee#coffee#GetExecutable',
|
\ 'executable': function('ale_linters#coffee#coffee#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#coffee#coffee#GetCommand',
|
\ 'command': function('ale_linters#coffee#coffee#GetCommand'),
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -37,7 +37,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('coffee', {
|
call ale#linter#Define('coffee', {
|
||||||
\ 'name': 'coffeelint',
|
\ 'name': 'coffeelint',
|
||||||
\ 'executable_callback': 'ale_linters#coffee#coffeelint#GetExecutable',
|
\ 'executable': function('ale_linters#coffee#coffeelint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#coffee#coffeelint#GetCommand',
|
\ 'command': function('ale_linters#coffee#coffeelint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#coffee#coffeelint#Handle',
|
\ 'callback': 'ale_linters#coffee#coffeelint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -7,8 +7,8 @@ call ale#Set('cpp_ccls_init_options', {})
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'ccls',
|
\ 'name': 'ccls',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_ccls_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_ccls_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale#handlers#ccls#GetProjectRoot',
|
\ 'project_root': function('ale#handlers#ccls#GetProjectRoot'),
|
||||||
\ 'initialization_options_callback': ale#VarFunc('cpp_ccls_init_options'),
|
\ 'initialization_options': {b -> ale#Var(b, 'cpp_ccls_init_options')},
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -18,7 +18,7 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'clang',
|
\ 'name': 'clang',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_clang_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_clang_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||||
\ {'callback': 'ale_linters#cpp#clang#GetCommand'},
|
\ {'callback': 'ale_linters#cpp#clang#GetCommand'},
|
||||||
|
|
|
@ -27,8 +27,8 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'clangcheck',
|
\ 'name': 'clangcheck',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_clangcheck_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_clangcheck_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#clangcheck#GetCommand',
|
\ 'command': function('ale_linters#cpp#clangcheck#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -17,7 +17,7 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'clangd',
|
\ 'name': 'clangd',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_clangd_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_clangd_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#clangd#GetCommand',
|
\ 'command': function('ale_linters#cpp#clangd#GetCommand'),
|
||||||
\ 'project_root_callback': 'ale_linters#cpp#clangd#GetProjectRoot',
|
\ 'project_root': function('ale_linters#cpp#clangd#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -29,8 +29,8 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'clangtidy',
|
\ 'name': 'clangtidy',
|
||||||
\ 'output_stream': 'stdout',
|
\ 'output_stream': 'stdout',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_clangtidy_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_clangtidy_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#clangtidy#GetCommand',
|
\ 'command': function('ale_linters#cpp#clangtidy#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -25,8 +25,8 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'clazy',
|
\ 'name': 'clazy',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_clazy_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_clazy_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#clazy#GetCommand',
|
\ 'command': function('ale_linters#cpp#clazy#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -28,7 +28,7 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'cppcheck',
|
\ 'name': 'cppcheck',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_cppcheck_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_cppcheck_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#cppcheck#GetCommand',
|
\ 'command': function('ale_linters#cpp#cppcheck#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
|
\ 'callback': 'ale#handlers#cppcheck#HandleCppCheckFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -13,8 +13,8 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'cpplint',
|
\ 'name': 'cpplint',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_cpplint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_cpplint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#cpplint#GetCommand',
|
\ 'command': function('ale_linters#cpp#cpplint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
\ 'callback': 'ale#handlers#cpplint#HandleCppLintFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -21,8 +21,8 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'cquery',
|
\ 'name': 'cquery',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_cquery_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_cquery_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale_linters#cpp#cquery#GetProjectRoot',
|
\ 'project_root': function('ale_linters#cpp#cquery#GetProjectRoot'),
|
||||||
\ 'initialization_options_callback': 'ale_linters#cpp#cquery#GetInitializationOptions',
|
\ 'initialization_options': function('ale_linters#cpp#cquery#GetInitializationOptions'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -19,7 +19,7 @@ endfunction
|
||||||
call ale#linter#Define('cpp', {
|
call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'flawfinder',
|
\ 'name': 'flawfinder',
|
||||||
\ 'output_stream': 'stdout',
|
\ 'output_stream': 'stdout',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_flawfinder_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_flawfinder_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cpp#flawfinder#GetCommand',
|
\ 'command': function('ale_linters#cpp#flawfinder#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
|
\ 'callback': 'ale#handlers#flawfinder#HandleFlawfinderFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -19,7 +19,7 @@ call ale#linter#Define('cpp', {
|
||||||
\ 'name': 'gcc',
|
\ 'name': 'gcc',
|
||||||
\ 'aliases': ['g++'],
|
\ 'aliases': ['g++'],
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cpp_gcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cpp_gcc_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
|
||||||
\ {'callback': 'ale_linters#cpp#gcc#GetCommand'},
|
\ {'callback': 'ale_linters#cpp#gcc#GetCommand'},
|
||||||
|
|
|
@ -26,6 +26,6 @@ call ale#linter#Define('crystal', {
|
||||||
\ 'executable': 'crystal',
|
\ 'executable': 'crystal',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\ 'command_callback': 'ale_linters#crystal#crystal#GetCommand',
|
\ 'command': function('ale_linters#crystal#crystal#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#crystal#crystal#Handle',
|
\ 'callback': 'ale_linters#crystal#crystal#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -32,6 +32,6 @@ call ale#linter#Define('cs',{
|
||||||
\ 'name': 'mcs',
|
\ 'name': 'mcs',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'mcs',
|
\ 'executable': 'mcs',
|
||||||
\ 'command_callback': 'ale_linters#cs#mcs#GetCommand',
|
\ 'command': function('ale_linters#cs#mcs#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#cs#mcs#Handle',
|
\ 'callback': 'ale_linters#cs#mcs#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -30,7 +30,7 @@ function! ale_linters#cs#mcsc#GetCommand(buffer) abort
|
||||||
|
|
||||||
" register temporary module target file with ale
|
" register temporary module target file with ale
|
||||||
" register temporary module target file with ALE.
|
" register temporary module target file with ALE.
|
||||||
let l:out = ale#engine#CreateFile(a:buffer)
|
let l:out = ale#command#CreateFile(a:buffer)
|
||||||
|
|
||||||
" The code is compiled as a module and the output is redirected to a
|
" The code is compiled as a module and the output is redirected to a
|
||||||
" temporary file.
|
" temporary file.
|
||||||
|
@ -75,7 +75,7 @@ call ale#linter#Define('cs',{
|
||||||
\ 'name': 'mcsc',
|
\ 'name': 'mcsc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'mcs',
|
\ 'executable': 'mcs',
|
||||||
\ 'command_callback': 'ale_linters#cs#mcsc#GetCommand',
|
\ 'command': function('ale_linters#cs#mcsc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#cs#mcsc#Handle',
|
\ 'callback': 'ale_linters#cs#mcsc#Handle',
|
||||||
\ 'lint_file': 1
|
\ 'lint_file': 1
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -13,6 +13,6 @@ endfunction
|
||||||
call ale#linter#Define('css', {
|
call ale#linter#Define('css', {
|
||||||
\ 'name': 'csslint',
|
\ 'name': 'csslint',
|
||||||
\ 'executable': 'csslint',
|
\ 'executable': 'csslint',
|
||||||
\ 'command_callback': 'ale_linters#css#csslint#GetCommand',
|
\ 'command': function('ale_linters#css#csslint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#css#HandleCSSLintFormat',
|
\ 'callback': 'ale#handlers#css#HandleCSSLintFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -11,9 +11,9 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('css', {
|
call ale#linter#Define('css', {
|
||||||
\ 'name': 'stylelint',
|
\ 'name': 'stylelint',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('css_stylelint', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'css_stylelint', [
|
||||||
\ 'node_modules/.bin/stylelint',
|
\ 'node_modules/.bin/stylelint',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command_callback': 'ale_linters#css#stylelint#GetCommand',
|
\ 'command': function('ale_linters#css#stylelint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
|
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -41,6 +41,6 @@ endfunction
|
||||||
call ale#linter#Define('cucumber', {
|
call ale#linter#Define('cucumber', {
|
||||||
\ 'name': 'cucumber',
|
\ 'name': 'cucumber',
|
||||||
\ 'executable': 'cucumber',
|
\ 'executable': 'cucumber',
|
||||||
\ 'command_callback': 'ale_linters#cucumber#cucumber#GetCommand',
|
\ 'command': function('ale_linters#cucumber#cucumber#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#cucumber#cucumber#Handle'
|
\ 'callback': 'ale_linters#cucumber#cucumber#Handle'
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -7,7 +7,7 @@ call ale#Set('cuda_nvcc_options', '-std=c++11')
|
||||||
function! ale_linters#cuda#nvcc#GetCommand(buffer) abort
|
function! ale_linters#cuda#nvcc#GetCommand(buffer) abort
|
||||||
" Unused: use ale#util#nul_file
|
" Unused: use ale#util#nul_file
|
||||||
" let l:output_file = ale#util#Tempname() . '.ii'
|
" let l:output_file = ale#util#Tempname() . '.ii'
|
||||||
" call ale#engine#ManageFile(a:buffer, l:output_file)
|
" call ale#command#ManageFile(a:buffer, l:output_file)
|
||||||
return '%e -cuda'
|
return '%e -cuda'
|
||||||
\ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)))
|
\ . ale#Pad(ale#c#IncludeOptions(ale#c#FindLocalHeaderPaths(a:buffer)))
|
||||||
\ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options'))
|
\ . ale#Pad(ale#Var(a:buffer, 'cuda_nvcc_options'))
|
||||||
|
@ -42,8 +42,8 @@ endfunction
|
||||||
call ale#linter#Define('cuda', {
|
call ale#linter#Define('cuda', {
|
||||||
\ 'name': 'nvcc',
|
\ 'name': 'nvcc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('cuda_nvcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'cuda_nvcc_executable')},
|
||||||
\ 'command_callback': 'ale_linters#cuda#nvcc#GetCommand',
|
\ 'command': function('ale_linters#cuda#nvcc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#cuda#nvcc#HandleNVCCFormat',
|
\ 'callback': 'ale_linters#cuda#nvcc#HandleNVCCFormat',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -16,7 +16,7 @@ endfunction
|
||||||
call ale#linter#Define('d', {
|
call ale#linter#Define('d', {
|
||||||
\ 'name': 'dls',
|
\ 'name': 'dls',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': 'ale_linters#d#dls#GetExecutable',
|
\ 'executable': function('ale_linters#d#dls#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#d#dls#GetExecutable',
|
\ 'command': function('ale_linters#d#dls#GetExecutable'),
|
||||||
\ 'project_root_callback': 'ale_linters#d#dls#FindProjectRoot',
|
\ 'project_root': function('ale_linters#d#dls#FindProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -29,8 +29,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('dart', {
|
call ale#linter#Define('dart', {
|
||||||
\ 'name': 'dartanalyzer',
|
\ 'name': 'dartanalyzer',
|
||||||
\ 'executable_callback': ale#VarFunc('dart_dartanalyzer_executable'),
|
\ 'executable': {b -> ale#Var(b, 'dart_dartanalyzer_executable')},
|
||||||
\ 'command_callback': 'ale_linters#dart#dartanalyzer#GetCommand',
|
\ 'command': function('ale_linters#dart#dartanalyzer#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#dart#dartanalyzer#Handle',
|
\ 'callback': 'ale_linters#dart#dartanalyzer#Handle',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -14,7 +14,7 @@ endfunction
|
||||||
call ale#linter#Define('dart', {
|
call ale#linter#Define('dart', {
|
||||||
\ 'name': 'language_server',
|
\ 'name': 'language_server',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('dart_language_server_executable'),
|
\ 'executable': {b -> ale#Var(b, 'dart_language_server_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale_linters#dart#language_server#GetProjectRoot',
|
\ 'project_root': function('ale_linters#dart#language_server#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -55,7 +55,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('dockerfile', {
|
call ale#linter#Define('dockerfile', {
|
||||||
\ 'name': 'dockerfile_lint',
|
\ 'name': 'dockerfile_lint',
|
||||||
\ 'executable_callback': ale#VarFunc('dockerfile_dockerfile_lint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'dockerfile_dockerfile_lint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#dockerfile#dockerfile_lint#GetCommand',
|
\ 'command': function('ale_linters#dockerfile#dockerfile_lint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#dockerfile#dockerfile_lint#Handle',
|
\ 'callback': 'ale_linters#dockerfile#dockerfile_lint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -93,7 +93,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('dockerfile', {
|
call ale#linter#Define('dockerfile', {
|
||||||
\ 'name': 'hadolint',
|
\ 'name': 'hadolint',
|
||||||
\ 'executable_callback': 'ale_linters#dockerfile#hadolint#GetExecutable',
|
\ 'executable': function('ale_linters#dockerfile#hadolint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#dockerfile#hadolint#GetCommand',
|
\ 'command': function('ale_linters#dockerfile#hadolint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#dockerfile#hadolint#Handle',
|
\ 'callback': 'ale_linters#dockerfile#hadolint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -47,6 +47,6 @@ endfunction
|
||||||
call ale#linter#Define('elixir', {
|
call ale#linter#Define('elixir', {
|
||||||
\ 'name': 'credo',
|
\ 'name': 'credo',
|
||||||
\ 'executable': 'mix',
|
\ 'executable': 'mix',
|
||||||
\ 'command_callback': 'ale_linters#elixir#credo#GetCommand',
|
\ 'command': function('ale_linters#elixir#credo#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#elixir#credo#Handle',
|
\ 'callback': 'ale_linters#elixir#credo#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -35,7 +35,7 @@ endfunction
|
||||||
call ale#linter#Define('elixir', {
|
call ale#linter#Define('elixir', {
|
||||||
\ 'name': 'dialyxir',
|
\ 'name': 'dialyxir',
|
||||||
\ 'executable': 'mix',
|
\ 'executable': 'mix',
|
||||||
\ 'command_callback': 'ale_linters#elixir#dialyxir#GetCommand',
|
\ 'command': function('ale_linters#elixir#dialyxir#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#elixir#dialyxir#Handle',
|
\ 'callback': 'ale_linters#elixir#dialyxir#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ endfunction
|
||||||
call ale#linter#Define('elixir', {
|
call ale#linter#Define('elixir', {
|
||||||
\ 'name': 'dogma',
|
\ 'name': 'dogma',
|
||||||
\ 'executable': 'mix',
|
\ 'executable': 'mix',
|
||||||
\ 'command_callback': 'ale_linters#elixir#dogma#GetCommand',
|
\ 'command': function('ale_linters#elixir#dogma#GetCommand'),
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\ 'callback': 'ale_linters#elixir#dogma#Handle',
|
\ 'callback': 'ale_linters#elixir#dogma#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -14,8 +14,8 @@ endfunction
|
||||||
call ale#linter#Define('elixir', {
|
call ale#linter#Define('elixir', {
|
||||||
\ 'name': 'elixir-ls',
|
\ 'name': 'elixir-ls',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
|
\ 'executable': function('ale_linters#elixir#elixir_ls#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
|
\ 'command': function('ale_linters#elixir#elixir_ls#GetExecutable'),
|
||||||
\ 'project_root_callback': 'ale#handlers#elixir#FindMixUmbrellaRoot',
|
\ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'),
|
||||||
\ 'lsp_config_callback': ale#VarFunc('elixir_elixir_ls_config'),
|
\ 'lsp_config': {b -> ale#Var(b, 'elixir_elixir_ls_config')},
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -32,7 +32,7 @@ endfunction
|
||||||
function! ale_linters#elixir#mix#GetCommand(buffer) abort
|
function! ale_linters#elixir#mix#GetCommand(buffer) abort
|
||||||
let l:project_root = ale#handlers#elixir#FindMixProjectRoot(a:buffer)
|
let l:project_root = ale#handlers#elixir#FindMixProjectRoot(a:buffer)
|
||||||
|
|
||||||
let l:temp_dir = ale#engine#CreateDirectory(a:buffer)
|
let l:temp_dir = ale#command#CreateDirectory(a:buffer)
|
||||||
|
|
||||||
let l:mix_build_path = has('win32')
|
let l:mix_build_path = has('win32')
|
||||||
\ ? 'set MIX_BUILD_PATH=' . ale#Escape(l:temp_dir) . ' &&'
|
\ ? 'set MIX_BUILD_PATH=' . ale#Escape(l:temp_dir) . ' &&'
|
||||||
|
@ -46,7 +46,7 @@ endfunction
|
||||||
call ale#linter#Define('elixir', {
|
call ale#linter#Define('elixir', {
|
||||||
\ 'name': 'mix',
|
\ 'name': 'mix',
|
||||||
\ 'executable': 'mix',
|
\ 'executable': 'mix',
|
||||||
\ 'command_callback': 'ale_linters#elixir#mix#GetCommand',
|
\ 'command': function('ale_linters#elixir#mix#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#elixir#mix#Handle',
|
\ 'callback': 'ale_linters#elixir#mix#Handle',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -189,7 +189,10 @@ endfunction
|
||||||
" Return the command to execute the linter in the projects directory.
|
" Return the command to execute the linter in the projects directory.
|
||||||
" If it doesn't, then this will fail when imports are needed.
|
" If it doesn't, then this will fail when imports are needed.
|
||||||
function! ale_linters#elm#make#GetCommand(buffer) abort
|
function! ale_linters#elm#make#GetCommand(buffer) abort
|
||||||
|
let l:executable = ale_linters#elm#make#GetExecutable(a:buffer)
|
||||||
let l:root_dir = ale_linters#elm#make#GetRootDir(a:buffer)
|
let l:root_dir = ale_linters#elm#make#GetRootDir(a:buffer)
|
||||||
|
let l:is_v19 = ale_linters#elm#make#IsVersionGte19(a:buffer)
|
||||||
|
let l:is_using_elm_test = l:executable =~# 'elm-test$'
|
||||||
|
|
||||||
if empty(l:root_dir)
|
if empty(l:root_dir)
|
||||||
let l:dir_set_cmd = ''
|
let l:dir_set_cmd = ''
|
||||||
|
@ -197,11 +200,20 @@ function! ale_linters#elm#make#GetCommand(buffer) abort
|
||||||
let l:dir_set_cmd = 'cd ' . ale#Escape(l:root_dir) . ' && '
|
let l:dir_set_cmd = 'cd ' . ale#Escape(l:root_dir) . ' && '
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" elm-test needs to know the path of elm-make if elm isn't installed globally.
|
||||||
|
" https://github.com/rtfeldman/node-test-runner/blob/57728f10668f2d2ab3179e7e3208bcfa9a1f19aa/README.md#--compiler
|
||||||
|
if l:is_v19 && l:is_using_elm_test
|
||||||
|
let l:elm_make_executable = ale#node#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm'])
|
||||||
|
let l:elm_test_compiler_flag = ' --compiler ' . l:elm_make_executable . ' '
|
||||||
|
else
|
||||||
|
let l:elm_test_compiler_flag = ' '
|
||||||
|
endif
|
||||||
|
|
||||||
" The elm compiler, at the time of this writing, uses '/dev/null' as
|
" The elm compiler, at the time of this writing, uses '/dev/null' as
|
||||||
" a sort of flag to tell the compiler not to generate an output file,
|
" a sort of flag to tell the compiler not to generate an output file,
|
||||||
" which is why this is hard coded here.
|
" which is why this is hard coded here.
|
||||||
" Source: https://github.com/elm-lang/elm-compiler/blob/19d5a769b30ec0b2fc4475985abb4cd94cd1d6c3/builder/src/Generate/Output.hs#L253
|
" Source: https://github.com/elm-lang/elm-compiler/blob/19d5a769b30ec0b2fc4475985abb4cd94cd1d6c3/builder/src/Generate/Output.hs#L253
|
||||||
return l:dir_set_cmd . '%e make --report=json --output=/dev/null %t'
|
return l:dir_set_cmd . '%e make --report=json --output=/dev/null' . l:elm_test_compiler_flag . '%t'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#elm#make#GetExecutable(buffer) abort
|
function! ale_linters#elm#make#GetExecutable(buffer) abort
|
||||||
|
@ -221,8 +233,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('elm', {
|
call ale#linter#Define('elm', {
|
||||||
\ 'name': 'make',
|
\ 'name': 'make',
|
||||||
\ 'executable_callback': 'ale_linters#elm#make#GetExecutable',
|
\ 'executable': function('ale_linters#elm#make#GetExecutable'),
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'command_callback': 'ale_linters#elm#make#GetCommand',
|
\ 'command': function('ale_linters#elm#make#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#elm#make#Handle'
|
\ 'callback': 'ale_linters#elm#make#Handle'
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -4,7 +4,7 @@ let g:ale_erlang_erlc_options = get(g:, 'ale_erlang_erlc_options', '')
|
||||||
|
|
||||||
function! ale_linters#erlang#erlc#GetCommand(buffer) abort
|
function! ale_linters#erlang#erlc#GetCommand(buffer) abort
|
||||||
let l:output_file = ale#util#Tempname()
|
let l:output_file = ale#util#Tempname()
|
||||||
call ale#engine#ManageFile(a:buffer, l:output_file)
|
call ale#command#ManageFile(a:buffer, l:output_file)
|
||||||
|
|
||||||
return 'erlc -o ' . ale#Escape(l:output_file)
|
return 'erlc -o ' . ale#Escape(l:output_file)
|
||||||
\ . ' ' . ale#Var(a:buffer, 'erlang_erlc_options')
|
\ . ' ' . ale#Var(a:buffer, 'erlang_erlc_options')
|
||||||
|
@ -91,6 +91,6 @@ endfunction
|
||||||
call ale#linter#Define('erlang', {
|
call ale#linter#Define('erlang', {
|
||||||
\ 'name': 'erlc',
|
\ 'name': 'erlc',
|
||||||
\ 'executable': 'erlc',
|
\ 'executable': 'erlc',
|
||||||
\ 'command_callback': 'ale_linters#erlang#erlc#GetCommand',
|
\ 'command': function('ale_linters#erlang#erlc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#erlang#erlc#Handle',
|
\ 'callback': 'ale_linters#erlang#erlc#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -26,7 +26,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('erlang', {
|
call ale#linter#Define('erlang', {
|
||||||
\ 'name': 'syntaxerl',
|
\ 'name': 'syntaxerl',
|
||||||
\ 'executable_callback': ale#VarFunc('erlang_syntaxerl_executable'),
|
\ 'executable': {b -> ale#Var(b, 'erlang_syntaxerl_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': {-> '%e -h'}},
|
\ {'callback': {-> '%e -h'}},
|
||||||
\ {'callback': 'ale_linters#erlang#syntaxerl#GetCommand'},
|
\ {'callback': 'ale_linters#erlang#syntaxerl#GetCommand'},
|
||||||
|
|
|
@ -19,7 +19,7 @@ call ale#linter#Define('eruby', {
|
||||||
\ 'aliases': ['erubylint'],
|
\ 'aliases': ['erubylint'],
|
||||||
\ 'executable': 'erb',
|
\ 'executable': 'erb',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'command_callback': 'ale_linters#eruby#erb#GetCommand',
|
\ 'command': function('ale_linters#eruby#erb#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
|
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
|
||||||
\})
|
\})
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,6 @@ call ale#linter#Define('eruby', {
|
||||||
\ 'name': 'erubis',
|
\ 'name': 'erubis',
|
||||||
\ 'executable': 'erubis',
|
\ 'executable': 'erubis',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'command_callback': 'ale_linters#eruby#erubis#GetCommand',
|
\ 'command': function('ale_linters#eruby#erubis#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
|
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -56,7 +56,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('eruby', {
|
call ale#linter#Define('eruby', {
|
||||||
\ 'name': 'ruumba',
|
\ 'name': 'ruumba',
|
||||||
\ 'executable_callback': ale#VarFunc('eruby_ruumba_executable'),
|
\ 'executable': {b -> ale#Var(b, 'eruby_ruumba_executable')},
|
||||||
\ 'command_callback': 'ale_linters#eruby#ruumba#GetCommand',
|
\ 'command': function('ale_linters#eruby#ruumba#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#eruby#ruumba#Handle',
|
\ 'callback': 'ale_linters#eruby#ruumba#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -66,7 +66,7 @@ endfunction
|
||||||
call ale#linter#Define('fortran', {
|
call ale#linter#Define('fortran', {
|
||||||
\ 'name': 'gcc',
|
\ 'name': 'gcc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('fortran_gcc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'fortran_gcc_executable')},
|
||||||
\ 'command_callback': 'ale_linters#fortran#gcc#GetCommand',
|
\ 'command': function('ale_linters#fortran#gcc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#fortran#gcc#Handle',
|
\ 'callback': 'ale_linters#fortran#gcc#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -13,7 +13,7 @@ endfunction
|
||||||
call ale#linter#Define('fortran', {
|
call ale#linter#Define('fortran', {
|
||||||
\ 'name': 'language_server',
|
\ 'name': 'language_server',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('fortran_language_server_executable'),
|
\ 'executable': {b -> ale#Var(b, 'fortran_language_server_executable')},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': 'ale_linters#fortran#language_server#GetProjectRoot',
|
\ 'project_root': function('ale_linters#fortran#language_server#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -27,7 +27,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('fuse', {
|
call ale#linter#Define('fuse', {
|
||||||
\ 'name': 'fusionlint',
|
\ 'name': 'fusionlint',
|
||||||
\ 'executable_callback': ale#VarFunc('fuse_fusionlint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'fuse_fusionlint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#fuse#fusionlint#GetCommand',
|
\ 'command': function('ale_linters#fuse#fusionlint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#fuse#fusionlint#Handle',
|
\ 'callback': 'ale_linters#fuse#fusionlint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -45,7 +45,7 @@ endfunction
|
||||||
call ale#linter#Define('gitcommit', {
|
call ale#linter#Define('gitcommit', {
|
||||||
\ 'name': 'gitlint',
|
\ 'name': 'gitlint',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': 'ale_linters#gitcommit#gitlint#GetExecutable',
|
\ 'executable': function('ale_linters#gitcommit#gitlint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#gitcommit#gitlint#GetCommand',
|
\ 'command': function('ale_linters#gitcommit#gitlint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#gitcommit#gitlint#Handle',
|
\ 'callback': 'ale_linters#gitcommit#gitlint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -34,7 +34,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('glsl', {
|
call ale#linter#Define('glsl', {
|
||||||
\ 'name': 'glslang',
|
\ 'name': 'glslang',
|
||||||
\ 'executable_callback': ale#VarFunc('glsl_glslang_executable'),
|
\ 'executable': {b -> ale#Var(b, 'glsl_glslang_executable')},
|
||||||
\ 'command_callback': 'ale_linters#glsl#glslang#GetCommand',
|
\ 'command': function('ale_linters#glsl#glslang#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#glsl#glslang#Handle',
|
\ 'callback': 'ale_linters#glsl#glslang#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -24,7 +24,7 @@ endfunction
|
||||||
call ale#linter#Define('glsl', {
|
call ale#linter#Define('glsl', {
|
||||||
\ 'name': 'glslls',
|
\ 'name': 'glslls',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('glsl_glslls_executable'),
|
\ 'executable': {b -> ale#Var(b, 'glsl_glslls_executable')},
|
||||||
\ 'command_callback': 'ale_linters#glsl#glslls#GetCommand',
|
\ 'command': function('ale_linters#glsl#glslls#GetCommand'),
|
||||||
\ 'project_root_callback': 'ale_linters#glsl#glslls#GetProjectRoot',
|
\ 'project_root': function('ale_linters#glsl#glslls#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -23,7 +23,7 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'bingo',
|
\ 'name': 'bingo',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('go_bingo_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_bingo_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#bingo#GetCommand',
|
\ 'command': function('ale_linters#go#bingo#GetCommand'),
|
||||||
\ 'project_root_callback': 'ale_linters#go#bingo#FindProjectRoot',
|
\ 'project_root': function('ale_linters#go#bingo#FindProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -48,8 +48,8 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'gobuild',
|
\ 'name': 'gobuild',
|
||||||
\ 'aliases': ['go build'],
|
\ 'aliases': ['go build'],
|
||||||
\ 'executable_callback': ale#VarFunc('go_go_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_go_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#gobuild#GetCommand',
|
\ 'command': function('ale_linters#go#gobuild#GetCommand'),
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'callback': 'ale_linters#go#gobuild#Handler',
|
\ 'callback': 'ale_linters#go#gobuild#Handler',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
|
|
|
@ -49,8 +49,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'golangci-lint',
|
\ 'name': 'golangci-lint',
|
||||||
\ 'executable_callback': ale#VarFunc('go_golangci_lint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_golangci_lint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#golangci_lint#GetCommand',
|
\ 'command': function('ale_linters#go#golangci_lint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#go#golangci_lint#Handler',
|
\ 'callback': 'ale_linters#go#golangci_lint#Handler',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -15,7 +15,7 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'golint',
|
\ 'name': 'golint',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'executable_callback': ale#VarFunc('go_golint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_golint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#golint#GetCommand',
|
\ 'command': function('ale_linters#go#golint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -50,8 +50,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'gometalinter',
|
\ 'name': 'gometalinter',
|
||||||
\ 'executable_callback': ale#VarFunc('go_gometalinter_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_gometalinter_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#gometalinter#GetCommand',
|
\ 'command': function('ale_linters#go#gometalinter#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#go#gometalinter#Handler',
|
\ 'callback': 'ale_linters#go#gometalinter#Handler',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -8,7 +8,7 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'gosimple',
|
\ 'name': 'gosimple',
|
||||||
\ 'executable': 'gosimple',
|
\ 'executable': 'gosimple',
|
||||||
\ 'command_callback': 'ale_linters#go#gosimple#GetCommand',
|
\ 'command': function('ale_linters#go#gosimple#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#go#Handler',
|
\ 'callback': 'ale#handlers#go#Handler',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
|
|
|
@ -13,7 +13,7 @@ call ale#linter#Define('go', {
|
||||||
\ 'name': 'gotype',
|
\ 'name': 'gotype',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'gotype',
|
\ 'executable': 'gotype',
|
||||||
\ 'command_callback': 'ale_linters#go#gotype#GetCommand',
|
\ 'command': function('ale_linters#go#gotype#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#go#Handler',
|
\ 'callback': 'ale#handlers#go#Handler',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -20,8 +20,8 @@ call ale#linter#Define('go', {
|
||||||
\ 'name': 'govet',
|
\ 'name': 'govet',
|
||||||
\ 'aliases': ['go vet'],
|
\ 'aliases': ['go vet'],
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('go_go_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_go_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#govet#GetCommand',
|
\ 'command': function('ale_linters#go#govet#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#go#Handler',
|
\ 'callback': 'ale#handlers#go#Handler',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -10,7 +10,7 @@ function! ale_linters#go#langserver#GetCommand(buffer) abort
|
||||||
let l:options = substitute(l:options, '-gocodecompletion', '', 'g')
|
let l:options = substitute(l:options, '-gocodecompletion', '', 'g')
|
||||||
let l:options = filter(split(l:options, ' '), 'empty(v:val) != 1')
|
let l:options = filter(split(l:options, ' '), 'empty(v:val) != 1')
|
||||||
|
|
||||||
if(ale#Var(a:buffer, 'completion_enabled') == 1)
|
if ale#Var(a:buffer, 'completion_enabled')
|
||||||
call add(l:options, '-gocodecompletion')
|
call add(l:options, '-gocodecompletion')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'golangserver',
|
\ 'name': 'golangserver',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#VarFunc('go_langserver_executable'),
|
\ 'executable': {b -> ale#Var(b, 'go_langserver_executable')},
|
||||||
\ 'command_callback': 'ale_linters#go#langserver#GetCommand',
|
\ 'command': function('ale_linters#go#langserver#GetCommand'),
|
||||||
\ 'project_root_callback': 'ale#go#FindProjectRoot',
|
\ 'project_root': function('ale#go#FindProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -26,7 +26,7 @@ endfunction
|
||||||
call ale#linter#Define('go', {
|
call ale#linter#Define('go', {
|
||||||
\ 'name': 'staticcheck',
|
\ 'name': 'staticcheck',
|
||||||
\ 'executable': 'staticcheck',
|
\ 'executable': 'staticcheck',
|
||||||
\ 'command_callback': 'ale_linters#go#staticcheck#GetCommand',
|
\ 'command': function('ale_linters#go#staticcheck#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#go#Handler',
|
\ 'callback': 'ale#handlers#go#Handler',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
call ale#linter#Define('graphql', {
|
call ale#linter#Define('graphql', {
|
||||||
\ 'name': 'eslint',
|
\ 'name': 'eslint',
|
||||||
\ 'executable_callback': 'ale#handlers#eslint#GetExecutable',
|
\ 'executable': function('ale#handlers#eslint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale#handlers#eslint#GetCommand',
|
\ 'command': function('ale#handlers#eslint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#eslint#Handle',
|
\ 'callback': 'ale#handlers#eslint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -10,6 +10,6 @@ endfunction
|
||||||
call ale#linter#Define('graphql', {
|
call ale#linter#Define('graphql', {
|
||||||
\ 'name': 'gqlint',
|
\ 'name': 'gqlint',
|
||||||
\ 'executable': 'gqlint',
|
\ 'executable': 'gqlint',
|
||||||
\ 'command_callback': 'ale_linters#graphql#gqlint#GetCommand',
|
\ 'command': function('ale_linters#graphql#gqlint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -16,7 +16,7 @@ endfunction
|
||||||
call ale#linter#Define('hack', {
|
call ale#linter#Define('hack', {
|
||||||
\ 'name': 'hack',
|
\ 'name': 'hack',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': 'ale_linters#hack#hack#GetExecutable',
|
\ 'executable': function('ale_linters#hack#hack#GetExecutable'),
|
||||||
\ 'command': '%e lsp --from vim-ale',
|
\ 'command': '%e lsp --from vim-ale',
|
||||||
\ 'project_root_callback': 'ale_linters#hack#hack#GetProjectRoot',
|
\ 'project_root': function('ale_linters#hack#hack#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -33,8 +33,8 @@ endfunction
|
||||||
call ale#linter#Define('hack', {
|
call ale#linter#Define('hack', {
|
||||||
\ 'name': 'hhast',
|
\ 'name': 'hhast',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': 'ale_linters#hack#hhast#GetExecutable',
|
\ 'executable': function('ale_linters#hack#hhast#GetExecutable'),
|
||||||
\ 'command': '%e --mode lsp --from vim-ale',
|
\ 'command': '%e --mode lsp --from vim-ale',
|
||||||
\ 'project_root_callback': 'ale_linters#hack#hhast#GetProjectRoot',
|
\ 'project_root': function('ale_linters#hack#hhast#GetProjectRoot'),
|
||||||
\ 'initialization_options_callback': 'ale_linters#hack#hhast#GetInitializationOptions',
|
\ 'initialization_options': function('ale_linters#hack#hhast#GetInitializationOptions'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -51,7 +51,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('haml', {
|
call ale#linter#Define('haml', {
|
||||||
\ 'name': 'hamllint',
|
\ 'name': 'hamllint',
|
||||||
\ 'executable_callback': 'ale_linters#haml#hamllint#GetExecutable',
|
\ 'executable': function('ale_linters#haml#hamllint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#haml#hamllint#GetCommand',
|
\ 'command': function('ale_linters#haml#hamllint#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#haml#hamllint#Handle'
|
\ 'callback': 'ale_linters#haml#hamllint#Handle'
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -31,9 +31,9 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('handlebars', {
|
call ale#linter#Define('handlebars', {
|
||||||
\ 'name': 'ember-template-lint',
|
\ 'name': 'ember-template-lint',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('handlebars_embertemplatelint', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'handlebars_embertemplatelint', [
|
||||||
\ 'node_modules/.bin/ember-template-lint',
|
\ 'node_modules/.bin/ember-template-lint',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command': '%e --json %t',
|
\ 'command': '%e --json %t',
|
||||||
\ 'callback': 'ale_linters#handlebars#embertemplatelint#Handle',
|
\ 'callback': 'ale_linters#handlebars#embertemplatelint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -14,6 +14,6 @@ call ale#linter#Define('haskell', {
|
||||||
\ 'aliases': ['cabal-ghc'],
|
\ 'aliases': ['cabal-ghc'],
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'cabal',
|
\ 'executable': 'cabal',
|
||||||
\ 'command_callback': 'ale_linters#haskell#cabal_ghc#GetCommand',
|
\ 'command': function('ale_linters#haskell#cabal_ghc#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -13,6 +13,6 @@ call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'ghc',
|
\ 'name': 'ghc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable': 'ghc',
|
\ 'executable': 'ghc',
|
||||||
\ 'command_callback': 'ale_linters#haskell#ghc#GetCommand',
|
\ 'command': function('ale_linters#haskell#ghc#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -13,7 +13,7 @@ endfunction
|
||||||
call ale#linter#Define('haskell', {
|
call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'ghc_mod',
|
\ 'name': 'ghc_mod',
|
||||||
\ 'aliases': ['ghc-mod'],
|
\ 'aliases': ['ghc-mod'],
|
||||||
\ 'executable_callback': ale#VarFunc('haskell_ghc_mod_executable'),
|
\ 'executable': {b -> ale#Var(b, 'haskell_ghc_mod_executable')},
|
||||||
\ 'command_callback': 'ale_linters#haskell#ghc_mod#GetCommand',
|
\ 'command': function('ale_linters#haskell#ghc_mod#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -14,7 +14,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('haskell', {
|
call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'hdevtools',
|
\ 'name': 'hdevtools',
|
||||||
\ 'executable_callback': ale#VarFunc('haskell_hdevtools_executable'),
|
\ 'executable': {b -> ale#Var(b, 'haskell_hdevtools_executable')},
|
||||||
\ 'command_callback': 'ale_linters#haskell#hdevtools#GetCommand',
|
\ 'command': function('ale_linters#haskell#hdevtools#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -9,26 +9,20 @@ function! ale_linters#haskell#hie#GetProjectRoot(buffer) abort
|
||||||
|
|
||||||
" If it's empty, search for the cabal file
|
" If it's empty, search for the cabal file
|
||||||
if empty(l:project_file)
|
if empty(l:project_file)
|
||||||
let l:cabal_file = fnamemodify(bufname(a:buffer), ':p:h')
|
" Search all of the paths except for the root filesystem path.
|
||||||
let l:paths = ''
|
let l:paths = join(
|
||||||
|
\ ale#path#Upwards(expand('#' . a:buffer . ':p:h'))[:-2],
|
||||||
while empty(matchstr(l:cabal_file, '^\(\/\|\(\w:\\\)\)$'))
|
\ ','
|
||||||
let l:cabal_file = fnamemodify(l:cabal_file, ':h')
|
\)
|
||||||
let l:paths = l:paths . l:cabal_file . ','
|
|
||||||
endwhile
|
|
||||||
|
|
||||||
let l:project_file = globpath(l:paths, '*.cabal')
|
let l:project_file = globpath(l:paths, '*.cabal')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Either extract the project directory or take the current working
|
" If we still can't find one, use the current file.
|
||||||
" directory
|
if empty(l:project_file)
|
||||||
if !empty(l:project_file)
|
let l:project_file = expand('#' . a:buffer . ':p')
|
||||||
let l:project_file = fnamemodify(l:project_file, ':h')
|
|
||||||
else
|
|
||||||
let l:project_file = expand('#' . a:buffer . ':p:h')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return l:project_file
|
return fnamemodify(l:project_file, ':h')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#haskell#hie#GetCommand(buffer) abort
|
function! ale_linters#haskell#hie#GetCommand(buffer) abort
|
||||||
|
@ -41,7 +35,7 @@ endfunction
|
||||||
call ale#linter#Define('haskell', {
|
call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'hie',
|
\ 'name': 'hie',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'command_callback': 'ale_linters#haskell#hie#GetCommand',
|
\ 'command': function('ale_linters#haskell#hie#GetCommand'),
|
||||||
\ 'executable_callback': ale#VarFunc('haskell_hie_executable'),
|
\ 'executable': {b -> ale#Var(b, 'haskell_hie_executable')},
|
||||||
\ 'project_root_callback': 'ale_linters#haskell#hie#GetProjectRoot',
|
\ 'project_root': function('ale_linters#haskell#hie#GetProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -40,7 +40,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('haskell', {
|
call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'hlint',
|
\ 'name': 'hlint',
|
||||||
\ 'executable_callback': ale#VarFunc('haskell_hlint_executable'),
|
\ 'executable': {b -> ale#Var(b, 'haskell_hlint_executable')},
|
||||||
\ 'command_callback': 'ale_linters#haskell#hlint#GetCommand' ,
|
\ 'command': function('ale_linters#haskell#hlint#GetCommand') ,
|
||||||
\ 'callback': 'ale_linters#haskell#hlint#Handle',
|
\ 'callback': 'ale_linters#haskell#hlint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -16,8 +16,8 @@ call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'stack_build',
|
\ 'name': 'stack_build',
|
||||||
\ 'aliases': ['stack-build'],
|
\ 'aliases': ['stack-build'],
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': 'ale#handlers#haskell#GetStackExecutable',
|
\ 'executable': function('ale#handlers#haskell#GetStackExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand',
|
\ 'command': function('ale_linters#haskell#stack_build#GetCommand'),
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
" Author: w0rp <devw0rp@gmail.com>
|
" Author: w0rp <devw0rp@gmail.com>
|
||||||
" Description: ghc for Haskell files, using Stack
|
" Description: ghc for Haskell files, using Stack
|
||||||
|
|
||||||
|
call ale#Set('haskell_stack_ghc_options', '-fno-code -v0')
|
||||||
|
|
||||||
|
function! ale_linters#haskell#stack_ghc#GetCommand(buffer) abort
|
||||||
|
return ale#handlers#haskell#GetStackExecutable(a:buffer)
|
||||||
|
\ . ' ghc -- '
|
||||||
|
\ . ale#Var(a:buffer, 'haskell_stack_ghc_options')
|
||||||
|
\ . ' %t'
|
||||||
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('haskell', {
|
call ale#linter#Define('haskell', {
|
||||||
\ 'name': 'stack_ghc',
|
\ 'name': 'stack_ghc',
|
||||||
\ 'aliases': ['stack-ghc'],
|
\ 'aliases': ['stack-ghc'],
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': 'ale#handlers#haskell#GetStackExecutable',
|
\ 'executable': function('ale#handlers#haskell#GetStackExecutable'),
|
||||||
\ 'command': 'stack ghc -- -fno-code -v0 %t',
|
\ 'command': function('ale_linters#haskell#stack_ghc#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
" Author: Johannes Wienke <languitar@semipol.de>
|
" Author: Johannes Wienke <languitar@semipol.de>
|
||||||
" Description: alex for help files
|
" Description: alex for help files
|
||||||
|
|
||||||
call ale#linter#Define('help', {
|
call ale#handlers#alex#DefineLinter('help', '--text')
|
||||||
\ 'name': 'alex',
|
|
||||||
\ 'executable': 'alex',
|
|
||||||
\ 'command': 'alex %s -t',
|
|
||||||
\ 'output_stream': 'stderr',
|
|
||||||
\ 'callback': 'ale#handlers#alex#Handle',
|
|
||||||
\ 'lint_file': 1,
|
|
||||||
\})
|
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
" Author: Johannes Wienke <languitar@semipol.de>
|
" Author: Johannes Wienke <languitar@semipol.de>
|
||||||
" Description: alex for HTML files
|
" Description: alex for HTML files
|
||||||
|
|
||||||
call ale#linter#Define('html', {
|
call ale#handlers#alex#DefineLinter('html', '--html')
|
||||||
\ 'name': 'alex',
|
|
||||||
\ 'executable': 'alex',
|
|
||||||
\ 'command': 'alex %s -t',
|
|
||||||
\ 'output_stream': 'stderr',
|
|
||||||
\ 'callback': 'ale#handlers#alex#Handle',
|
|
||||||
\ 'lint_file': 1,
|
|
||||||
\})
|
|
||||||
|
|
|
@ -24,9 +24,9 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('html', {
|
call ale#linter#Define('html', {
|
||||||
\ 'name': 'htmlhint',
|
\ 'name': 'htmlhint',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('html_htmlhint', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'html_htmlhint', [
|
||||||
\ 'node_modules/.bin/htmlhint',
|
\ 'node_modules/.bin/htmlhint',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command_callback': 'ale_linters#html#htmlhint#GetCommand',
|
\ 'command': function('ale_linters#html#htmlhint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -21,7 +21,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('html', {
|
call ale#linter#Define('html', {
|
||||||
\ 'name': 'stylelint',
|
\ 'name': 'stylelint',
|
||||||
\ 'executable_callback': 'ale_linters#html#stylelint#GetExecutable',
|
\ 'executable': function('ale_linters#html#stylelint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#html#stylelint#GetCommand',
|
\ 'command': function('ale_linters#html#stylelint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
|
\ 'callback': 'ale#handlers#css#HandleStyleLintFormat',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -63,8 +63,8 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('html', {
|
call ale#linter#Define('html', {
|
||||||
\ 'name': 'tidy',
|
\ 'name': 'tidy',
|
||||||
\ 'executable_callback': ale#VarFunc('html_tidy_executable'),
|
\ 'executable': {b -> ale#Var(b, 'html_tidy_executable')},
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'command_callback': 'ale_linters#html#tidy#GetCommand',
|
\ 'command': function('ale_linters#html#tidy#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#html#tidy#Handle',
|
\ 'callback': 'ale_linters#html#tidy#Handle',
|
||||||
\ })
|
\ })
|
||||||
|
|
|
@ -75,7 +75,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('idris', {
|
call ale#linter#Define('idris', {
|
||||||
\ 'name': 'idris',
|
\ 'name': 'idris',
|
||||||
\ 'executable_callback': ale#VarFunc('idris_idris_executable'),
|
\ 'executable': {b -> ale#Var(b, 'idris_idris_executable')},
|
||||||
\ 'command_callback': 'ale_linters#idris#idris#GetCommand',
|
\ 'command': function('ale_linters#idris#idris#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#idris#idris#Handle',
|
\ 'callback': 'ale_linters#idris#idris#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -38,8 +38,8 @@ endfunction
|
||||||
call ale#linter#Define('ispc', {
|
call ale#linter#Define('ispc', {
|
||||||
\ 'name': 'ispc',
|
\ 'name': 'ispc',
|
||||||
\ 'output_stream': 'stderr',
|
\ 'output_stream': 'stderr',
|
||||||
\ 'executable_callback': ale#VarFunc('ispc_ispc_executable'),
|
\ 'executable': {b -> ale#Var(b, 'ispc_ispc_executable')},
|
||||||
\ 'command_callback': 'ale_linters#ispc#ispc#GetCommand',
|
\ 'command': function('ale_linters#ispc#ispc#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#ispc#ispc#Handle',
|
\ 'callback': 'ale_linters#ispc#ispc#Handle',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -44,7 +44,7 @@ endif
|
||||||
call ale#linter#Define('java', {
|
call ale#linter#Define('java', {
|
||||||
\ 'name': 'checkstyle',
|
\ 'name': 'checkstyle',
|
||||||
\ 'executable': 'checkstyle',
|
\ 'executable': 'checkstyle',
|
||||||
\ 'command_callback': 'ale_linters#java#checkstyle#GetCommand',
|
\ 'command': function('ale_linters#java#checkstyle#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#java#checkstyle#Handle',
|
\ 'callback': 'ale_linters#java#checkstyle#Handle',
|
||||||
\ 'lint_file': 1,
|
\ 'lint_file': 1,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -55,17 +55,16 @@ function! ale_linters#java#javac#GetCommand(buffer, import_paths) abort
|
||||||
if isdirectory(l:jaxb_dir)
|
if isdirectory(l:jaxb_dir)
|
||||||
call add(l:sp_dirs, l:jaxb_dir)
|
call add(l:sp_dirs, l:jaxb_dir)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
" Automatically include the test directory, but only for test code.
|
" Automatically include the test directory, but only for test code.
|
||||||
if expand('#' . a:buffer . ':p') =~? '\vsrc[/\\]test[/\\]java'
|
if expand('#' . a:buffer . ':p') =~? '\vsrc[/\\]test[/\\]java'
|
||||||
let l:test_dir = fnamemodify(l:src_dir, ':h:h:h')
|
let l:test_dir = ale#path#FindNearestDirectory(a:buffer, 'src/test/java')
|
||||||
\ . (has('win32') ? '\test\java\' : '/test/java/')
|
|
||||||
|
|
||||||
if isdirectory(l:test_dir)
|
if isdirectory(l:test_dir)
|
||||||
call add(l:sp_dirs, l:test_dir)
|
call add(l:sp_dirs, l:test_dir)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
if !empty(l:sp_dirs)
|
if !empty(l:sp_dirs)
|
||||||
let l:sp_option = '-sourcepath '
|
let l:sp_option = '-sourcepath '
|
||||||
|
@ -73,7 +72,7 @@ function! ale_linters#java#javac#GetCommand(buffer, import_paths) abort
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Create .class files in a temporary directory, which we will delete later.
|
" Create .class files in a temporary directory, which we will delete later.
|
||||||
let l:class_file_directory = ale#engine#CreateDirectory(a:buffer)
|
let l:class_file_directory = ale#command#CreateDirectory(a:buffer)
|
||||||
|
|
||||||
" Always run javac from the directory the file is in, so we can resolve
|
" Always run javac from the directory the file is in, so we can resolve
|
||||||
" relative paths correctly.
|
" relative paths correctly.
|
||||||
|
@ -120,7 +119,7 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('java', {
|
call ale#linter#Define('java', {
|
||||||
\ 'name': 'javac',
|
\ 'name': 'javac',
|
||||||
\ 'executable_callback': ale#VarFunc('java_javac_executable'),
|
\ 'executable': {b -> ale#Var(b, 'java_javac_executable')},
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale_linters#java#javac#GetImportPaths', 'output_stream': 'stdout'},
|
\ {'callback': 'ale_linters#java#javac#GetImportPaths', 'output_stream': 'stdout'},
|
||||||
\ {'callback': 'ale_linters#java#javac#GetCommand', 'output_stream': 'stderr'},
|
\ {'callback': 'ale_linters#java#javac#GetCommand', 'output_stream': 'stderr'},
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
" Author: Horacio Sanson <https://github.com/hsanson>
|
" Author: Horacio Sanson <https://github.com/hsanson>
|
||||||
" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac
|
" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac
|
||||||
|
|
||||||
call ale#Set('java_javalsp_jar', 'javacs.jar')
|
|
||||||
call ale#Set('java_javalsp_executable', 'java')
|
call ale#Set('java_javalsp_executable', 'java')
|
||||||
|
|
||||||
function! ale_linters#java#javalsp#Executable(buffer) abort
|
function! ale_linters#java#javalsp#Executable(buffer) abort
|
||||||
|
@ -9,17 +8,16 @@ function! ale_linters#java#javalsp#Executable(buffer) abort
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#java#javalsp#Command(buffer) abort
|
function! ale_linters#java#javalsp#Command(buffer) abort
|
||||||
let l:jar = ale#Var(a:buffer, 'java_javalsp_jar')
|
|
||||||
let l:executable = ale_linters#java#javalsp#Executable(a:buffer)
|
let l:executable = ale_linters#java#javalsp#Executable(a:buffer)
|
||||||
|
|
||||||
return ale#Escape(l:executable) . ' -cp ' . l:jar . ' -Xverify:none org.javacs.Main'
|
return ale#Escape(l:executable) . ' -Xverify:none -m javacs/org.javacs.Main'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('java', {
|
call ale#linter#Define('java', {
|
||||||
\ 'name': 'javalsp',
|
\ 'name': 'javalsp',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': 'ale_linters#java#javalsp#Executable',
|
\ 'executable': function('ale_linters#java#javalsp#Executable'),
|
||||||
\ 'command_callback': 'ale_linters#java#javalsp#Command',
|
\ 'command': function('ale_linters#java#javalsp#Command'),
|
||||||
\ 'language': 'java',
|
\ 'language': 'java',
|
||||||
\ 'project_root_callback': 'ale#java#FindProjectRoot',
|
\ 'project_root': function('ale#java#FindProjectRoot'),
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -31,6 +31,6 @@ endif
|
||||||
call ale#linter#Define('java', {
|
call ale#linter#Define('java', {
|
||||||
\ 'name': 'pmd',
|
\ 'name': 'pmd',
|
||||||
\ 'executable': 'pmd',
|
\ 'executable': 'pmd',
|
||||||
\ 'command_callback': 'ale_linters#java#pmd#GetCommand',
|
\ 'command': function('ale_linters#java#pmd#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#java#pmd#Handle',
|
\ 'callback': 'ale_linters#java#pmd#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'eslint',
|
\ 'name': 'eslint',
|
||||||
\ 'output_stream': 'both',
|
\ 'output_stream': 'both',
|
||||||
\ 'executable_callback': 'ale#handlers#eslint#GetExecutable',
|
\ 'executable': function('ale#handlers#eslint#GetExecutable'),
|
||||||
\ 'command_callback': 'ale#handlers#eslint#GetCommand',
|
\ 'command': function('ale#handlers#eslint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#eslint#Handle',
|
\ 'callback': 'ale#handlers#eslint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -54,7 +54,8 @@ function! ale_linters#javascript#flow#GetCommand(buffer, version_lines) abort
|
||||||
return ale#Escape(l:executable)
|
return ale#Escape(l:executable)
|
||||||
\ . ' check-contents'
|
\ . ' check-contents'
|
||||||
\ . (l:use_respect_pragma ? ' --respect-pragma': '')
|
\ . (l:use_respect_pragma ? ' --respect-pragma': '')
|
||||||
\ . ' --json --from ale %s'
|
\ . ' --json --from ale %s < %t'
|
||||||
|
\ . (!has('win32') ? '; echo' : '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Filter lines of flow output until we find the first line where the JSON
|
" Filter lines of flow output until we find the first line where the JSON
|
||||||
|
@ -155,7 +156,8 @@ function! ale_linters#javascript#flow#Handle(buffer, lines) abort
|
||||||
\}
|
\}
|
||||||
|
|
||||||
if has_key(l:error, 'extra')
|
if has_key(l:error, 'extra')
|
||||||
let l:errorToAdd.detail = s:GetDetails(l:error)
|
let l:errorToAdd.detail = l:errorToAdd.text
|
||||||
|
\ . "\n" . s:GetDetails(l:error)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call add(l:output, l:errorToAdd)
|
call add(l:output, l:errorToAdd)
|
||||||
|
@ -166,11 +168,11 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'flow',
|
\ 'name': 'flow',
|
||||||
\ 'executable_callback': 'ale_linters#javascript#flow#GetExecutable',
|
\ 'executable': function('ale_linters#javascript#flow#GetExecutable'),
|
||||||
\ 'command_chain': [
|
\ 'command_chain': [
|
||||||
\ {'callback': 'ale_linters#javascript#flow#VersionCheck'},
|
\ {'callback': 'ale_linters#javascript#flow#VersionCheck'},
|
||||||
\ {'callback': 'ale_linters#javascript#flow#GetCommand'},
|
\ {'callback': 'ale_linters#javascript#flow#GetCommand'},
|
||||||
\ ],
|
\ ],
|
||||||
\ 'callback': 'ale_linters#javascript#flow#Handle',
|
\ 'callback': 'ale_linters#javascript#flow#Handle',
|
||||||
\ 'add_newline': !has('win32'),
|
\ 'read_buffer': 0,
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -19,10 +19,10 @@ endfunction
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'flow-language-server',
|
\ 'name': 'flow-language-server',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('javascript_flow_ls', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_flow_ls', [
|
||||||
\ 'node_modules/.bin/flow',
|
\ 'node_modules/.bin/flow',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command': '%e lsp --from ale-lsp',
|
\ 'command': '%e lsp --from ale-lsp',
|
||||||
\ 'project_root_callback': 'ale_linters#javascript#flow_ls#FindProjectRoot',
|
\ 'project_root': function('ale_linters#javascript#flow_ls#FindProjectRoot'),
|
||||||
\ 'language': 'javascript',
|
\ 'language': 'javascript',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -53,9 +53,9 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'jscs',
|
\ 'name': 'jscs',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('javascript_jscs', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jscs', [
|
||||||
\ 'node_modules/.bin/jscs',
|
\ 'node_modules/.bin/jscs',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command_callback': 'ale_linters#javascript#jscs#GetCommand',
|
\ 'command': function('ale_linters#javascript#jscs#GetCommand'),
|
||||||
\ 'callback': 'ale_linters#javascript#jscs#Handle',
|
\ 'callback': 'ale_linters#javascript#jscs#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -25,9 +25,9 @@ endfunction
|
||||||
|
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'jshint',
|
\ 'name': 'jshint',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('javascript_jshint', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jshint', [
|
||||||
\ 'node_modules/.bin/jshint',
|
\ 'node_modules/.bin/jshint',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command_callback': 'ale_linters#javascript#jshint#GetCommand',
|
\ 'command': function('ale_linters#javascript#jshint#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -24,7 +24,7 @@ endfunction
|
||||||
" standard uses eslint and the output format is the same
|
" standard uses eslint and the output format is the same
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'standard',
|
\ 'name': 'standard',
|
||||||
\ 'executable_callback': 'ale_linters#javascript#standard#GetExecutable',
|
\ 'executable': function('ale_linters#javascript#standard#GetExecutable'),
|
||||||
\ 'command_callback': 'ale_linters#javascript#standard#GetCommand',
|
\ 'command': function('ale_linters#javascript#standard#GetCommand'),
|
||||||
\ 'callback': 'ale#handlers#eslint#Handle',
|
\ 'callback': 'ale#handlers#eslint#Handle',
|
||||||
\})
|
\})
|
||||||
|
|
|
@ -8,10 +8,10 @@ call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executabl
|
||||||
call ale#linter#Define('javascript', {
|
call ale#linter#Define('javascript', {
|
||||||
\ 'name': 'tsserver',
|
\ 'name': 'tsserver',
|
||||||
\ 'lsp': 'tsserver',
|
\ 'lsp': 'tsserver',
|
||||||
\ 'executable_callback': ale#node#FindExecutableFunc('javascript_tsserver', [
|
\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_tsserver', [
|
||||||
\ 'node_modules/.bin/tsserver',
|
\ 'node_modules/.bin/tsserver',
|
||||||
\ ]),
|
\ ])},
|
||||||
\ 'command': '%e',
|
\ 'command': '%e',
|
||||||
\ 'project_root_callback': {-> ''},
|
\ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'),
|
||||||
\ 'language': '',
|
\ 'language': '',
|
||||||
\})
|
\})
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue