summaryrefslogtreecommitdiff
path: root/test/command_callback/test_lintr_command_callback.vader
diff options
context:
space:
mode:
authorFenner Macrae <13209544+fennerm@users.noreply.github.com>2018-02-04 10:57:52 -0800
committerFenner Macrae <13209544+fennerm@users.noreply.github.com>2018-02-04 10:57:52 -0800
commitdda132c1a2818390cafd674e5db0e3b6ce802965 (patch)
tree3066f06a1543fb99c23f59fb72ec7b5be098b5d7 /test/command_callback/test_lintr_command_callback.vader
parent33b3331b0499e502f01730af60fb0e9b5a30951f (diff)
downloadale-dda132c1a2818390cafd674e5db0e3b6ce802965.zip
Add lint_package support to lintr
Diffstat (limited to 'test/command_callback/test_lintr_command_callback.vader')
-rw-r--r--test/command_callback/test_lintr_command_callback.vader12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/command_callback/test_lintr_command_callback.vader b/test/command_callback/test_lintr_command_callback.vader
index 256618cf..33259e05 100644
--- a/test/command_callback/test_lintr_command_callback.vader
+++ b/test/command_callback/test_lintr_command_callback.vader
@@ -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(''))