-
Notifications
You must be signed in to change notification settings - Fork 1.1k
R Markdown: lintr
This file exists only as a historic reference. Documentation for syntastic
checkers is now included in the manual, please see :help syntastic-checkers
in Vim.
Maintainer: Jim Hester [email protected]
lintr is a static code analysys tool for R files. See the project's page at GitHub for details.
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_lintr_checker
to 1 in
your vimrc to enable this checker:
let g:syntastic_enable_r_lintr_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 lintr
to g:syntastic_rmd_checkers
if you
want to use it.
The following options are supported:
- g:syntastic_r_lintr_linters (string; default: 'default_linters')
- Which [lintr][1] linters to apply to your code.
- g:syntastic_r_lintr_cache (string; default: 'FALSE')
- Whether to use the lintr cache. This speeds up linting time, but can introduce false positives in some cases.
This checker doesn't call the makeprgBuild()
function, and thus it ignores
the usual g:syntastic_rmd_lintr_<option>
variables. The only exception is
g:syntastic_rmd_lintr_exec
, which can still be used to override the R
executable.