You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
557 B
VimL
16 lines
557 B
VimL
7 years ago
|
" Author: Michel Lang <michellang@gmail.com>, w0rp <devw0rp@gmail.com>
|
||
|
" Description: This file adds support for checking R code with lintr.
|
||
|
|
||
|
function! ale_linters#r#lintr#GetCommand(buffer) abort
|
||
|
return ale#path#BufferCdString(a:buffer)
|
||
|
\ . 'Rscript -e ' . ale#Escape('lintr::lint(commandArgs(TRUE))') . ' %t'
|
||
|
endfunction
|
||
|
|
||
|
call ale#linter#Define('r', {
|
||
|
\ 'name': 'lintr',
|
||
|
\ 'executable': 'Rscript',
|
||
|
\ 'command_callback': 'ale_linters#r#lintr#GetCommand',
|
||
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
||
|
\ 'output_stream': 'both',
|
||
|
\})
|