Set lint_file for the ameba linter

This commit is contained in:
w0rp 2019-01-27 16:16:22 +00:00
parent 17a2f554e3
commit 067601e9db
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
1 changed files with 8 additions and 7 deletions

View File

@ -11,13 +11,6 @@ function! ale_linters#crystal#ameba#GetCommand(buffer) abort
\ . ale#Escape(expand('#' . a:buffer . ':p'))
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
function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
if len(a:lines) == 0
@ -54,3 +47,11 @@ function! ale_linters#crystal#ameba#HandleAmebaOutput(buffer, lines) abort
return l:output
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,
\})