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

R: lint

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: LCD 47 [email protected]

This is a style checker for R files, using the R package lint.

Checker option

g:syntastic_r_lint_styles (string; default: "lint.style")
R list of style tests to apply.

Set g:syntastic_r_lint_styles to something like this:

let g:syntastic_r_lint_styles = 'list(spacing.indentation.notabs, spacing.indentation.evenindent)'

See lint's manual for possible values.

Limitations

The checker uses column numbers only when running into syntax errors. If you're checking files containing tab characters, then 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

The lint package will only show at most 5 messages of a kind. At the time of this writing, this is not configurable.

Beware also that the checker is pretty slow when using the default style setting of lint.style.

Note

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

Clone this wiki locally