Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

R: lintr

LCD 47 edited this page Dec 8, 2015 · 5 revisions

Maintainer: Jim Hester [email protected]

lintr is a static code analysys tool for R files. See the project's page at GitHub for details.

Security

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_r_checkers if you want to use it.

Checker Options

The following options are supported:

g:syntastic_r_lintr_linters (string; default: 'default_linters')
Linters to use.
g:syntastic_r_lintr_cache (string; default: 'FALSE')
Toggle caching of lint results.

Note

This checker doesn't call the makeprgBuild() function, and thus it ignores the usual g:syntastic_r_lintr_<option> variables. The only exception is g:syntastic_r_lintr_exec, which can still be used to override the R executable.

Clone this wiki locally