-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(v3.7.0) R: svtools
Maintainer: LCD 47 [email protected]
This is a checker for R files, using the R package svTools
(which, in turn, delegates most of the work to the checkUsage()
function in the codetools package).
This checker executes parts of your file. This is probably fine if
you wrote the file yourself, but it can be a problem if you're trying
to check third party files. If you are 100% willing to let Vim run the
code in your file, set g:syntastic_enable_r_svtools_checker
to 1 in
your vimrc to enable this checker:
let g:syntastic_enable_r_svtools_checker = 1
There is also a buffer-local version of this variable, that takes precedence over it in the buffers where it is defined.
Please note that setting this variable doesn't automatically enable the
checker, you still need to add svtools
to g:syntastic_r_checkers
if you
want to use it.
svTools version 0.9-4 (current at the time of this writing) has a number of problems that prevents it from checking most sources. You might consider applying this patch as a workaround.
At the time of this writing, svTools doesn't produce meaningful
column numbers (the column numbers are always set to 1). The patch
mentioned above enables svTools to produce more useful column
numbers, but only for syntax errors. If you apply the said patch and
you're checking files containing tab characters, Vim's tabstop
must
match R's idea of tabstop, otherwise column numbers will be shifted.
At the time of this writing R's tabstop is hardcoded to 8, so you
should probably add something like this to your vimrc:
set tabstop=8
This checker doesn't call the makeprgBuild()
function, and thus it ignores
the usual g:syntastic_r_svtools_<option>
variables. The only exception is
g:syntastic_r_svtools_exec
, which can still be used to override the R
executable.