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 Jun 12, 2016 · 5 revisions

This file is no longer maintained

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 james.f.hester@gmail.com

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')
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.

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