Add lint_package support to lintr

This commit is contained in:
Fenner Macrae 2018-02-04 10:57:52 -08:00
parent 33b3331b04
commit dda132c1a2
3 changed files with 33 additions and 2 deletions

View file

@ -34,3 +34,15 @@ Execute(The lintr options should be configurable):
\ . 'with_defaults(object_usage_linter = NULL))')
\ . ' %t',
\ ale_linters#r#lintr#GetCommand(bufnr(''))
Execute(If the lint_package flag is set, lintr::lint_package should be called):
let b:ale_r_lintr_lint_package = 1
AssertEqual
\ 'cd ' . ale#Escape(getcwd()) . ' && '
\ . 'Rscript -e '
\ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
\ . 'lint_package(cache = FALSE, commandArgs(TRUE),'
\ . 'with_defaults())')
\ . ' %t',
\ ale_linters#r#lintr#GetCommand(bufnr(''))