add support for locally installed coffeelint
This commit is contained in:
parent
97131262ab
commit
1da187a6e5
@ -1,6 +1,19 @@
|
|||||||
" Author: Prashanth Chandra https://github.com/prashcr
|
" Author: Prashanth Chandra https://github.com/prashcr
|
||||||
" Description: coffeelint linter for coffeescript files
|
" Description: coffeelint linter for coffeescript files
|
||||||
|
|
||||||
|
function! ale_linters#coffee#coffeelint#GetExecutable(buffer) abort
|
||||||
|
return ale#util#ResolveLocalPath(
|
||||||
|
\ a:buffer,
|
||||||
|
\ 'node_modules/.bin/coffeelint',
|
||||||
|
\ 'coffeelint'
|
||||||
|
\)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#coffee#coffeelint#GetCommand(buffer) abort
|
||||||
|
return ale_linters#coffee#coffeelint#GetExecutable(a:buffer)
|
||||||
|
\ . ' --stdin --reporter csv'
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! ale_linters#coffee#coffeelint#Handle(buffer, lines) abort
|
function! ale_linters#coffee#coffeelint#Handle(buffer, lines) abort
|
||||||
" Matches patterns like the following:
|
" Matches patterns like the following:
|
||||||
"
|
"
|
||||||
@ -40,7 +53,7 @@ endfunction
|
|||||||
|
|
||||||
call ale#linter#Define('coffee', {
|
call ale#linter#Define('coffee', {
|
||||||
\ 'name': 'coffeelint',
|
\ 'name': 'coffeelint',
|
||||||
\ 'executable': 'coffeelint',
|
\ 'executable_callback': 'ale_linters#coffee#coffeelint#GetExecutable',
|
||||||
\ 'command': 'coffeelint --stdin --reporter csv',
|
\ 'command_callback': 'ale_linters#coffee#coffeelint#GetCommand',
|
||||||
\ 'callback': 'ale_linters#coffee#coffeelint#Handle',
|
\ 'callback': 'ale_linters#coffee#coffeelint#Handle',
|
||||||
\})
|
\})
|
||||||
|
Loading…
Reference in New Issue
Block a user