mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 21:24:33 +08:00
Set lint_file for the ameba linter
This commit is contained in:
@@ -11,13 +11,6 @@ function! ale_linters#crystal#ameba#GetCommand(buffer) abort
|
|||||||
\ . ale#Escape(expand('#' . a:buffer . ':p'))
|
\ . ale#Escape(expand('#' . a:buffer . ':p'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('crystal', {
|
|
||||||
\ 'name': 'ameba',
|
|
||||||
\ 'executable_callback': ale#VarFunc('crystal_ameba_executable'),
|
|
||||||
\ 'command_callback': 'ale_linters#crystal#ameba#GetCommand',
|
|
||||||
\ 'callback': 'ale_linters#crystal#ameba#HandleAmebaOutput',
|
|
||||||
\})
|
|
||||||
|
|
||||||
" Handle output from ameba
|
" Handle output from ameba
|
||||||
function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
|
function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
|
||||||
if len(a:lines) == 0
|
if len(a:lines) == 0
|
||||||
@@ -54,3 +47,11 @@ function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
|
|||||||
|
|
||||||
return l:output
|
return l:output
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#Define('crystal', {
|
||||||
|
\ 'name': 'ameba',
|
||||||
|
\ 'executable_callback': ale#VarFunc('crystal_ameba_executable'),
|
||||||
|
\ 'command_callback': 'ale_linters#crystal#ameba#GetCommand',
|
||||||
|
\ 'callback': 'ale_linters#crystal#ameba#HandleAmebaOutput',
|
||||||
|
\ 'lint_file': 1,
|
||||||
|
\})
|
||||||
|
|||||||
Reference in New Issue
Block a user