summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorourigen <79729735+ourigen@users.noreply.github.com>2021-05-25 00:30:42 +0000
committerGitHub <noreply@github.com>2021-05-25 09:30:42 +0900
commit6ef5bf308c91e5960ae84460329bf39287b17e23 (patch)
treec834894900639b32d2bdfe4279e0eac19287e1fa
parent93f80ea7677df8584246262c67dd8575bd98dbeb (diff)
downloadale-6ef5bf308c91e5960ae84460329bf39287b17e23.zip
Allow lintr to consider .Renviron settings. Fix #3391 (#3727)
* Fix lintr.vim to consider Renviron * Update test_lintr.vader to match lintr.vim fix * Update credits Co-authored-by: ourigen <ourigen [at] pm.me>
-rw-r--r--ale_linters/r/lintr.vim5
-rw-r--r--ale_linters/tex/texlab.vim2
-rw-r--r--test/linter/test_lintr.vader6
3 files changed, 7 insertions, 6 deletions
diff --git a/ale_linters/r/lintr.vim b/ale_linters/r/lintr.vim
index 799458fb..339ad2b0 100644
--- a/ale_linters/r/lintr.vim
+++ b/ale_linters/r/lintr.vim
@@ -1,5 +1,6 @@
" Author: Michel Lang <michellang@gmail.com>, w0rp <devw0rp@gmail.com>,
-" Fenner Macrae <fmacrae.dev@gmail.com>
+" Fenner Macrae <fmacrae.dev@gmail.com>,
+" ourigen <https://github.com/ourigen>
" Description: This file adds support for checking R code with lintr.
let g:ale_r_lintr_options = get(g:, 'ale_r_lintr_options', 'with_defaults()')
@@ -21,7 +22,7 @@ function! ale_linters#r#lintr#GetCommand(buffer) abort
let l:cmd_string = 'suppressPackageStartupMessages(library(lintr));'
\ . l:lint_cmd
- return 'Rscript --vanilla -e ' . ale#Escape(l:cmd_string) . ' %t'
+ return 'Rscript --no-save --no-restore --no-site-file --no-init-file -e ' . ale#Escape(l:cmd_string) . ' %t'
endfunction
call ale#linter#Define('r', {
diff --git a/ale_linters/tex/texlab.vim b/ale_linters/tex/texlab.vim
index dd26fa0a..0794bf51 100644
--- a/ale_linters/tex/texlab.vim
+++ b/ale_linters/tex/texlab.vim
@@ -1,5 +1,5 @@
" Author: Ricardo Liang <ricardoliang@gmail.com>
-" Author: ourigen <ourigen [at] pm.me>
+" Author: ourigen <https://github.com/ourigen>
" Description: Texlab language server (Rust rewrite)
call ale#Set('tex_texlab_executable', 'texlab')
diff --git a/test/linter/test_lintr.vader b/test/linter/test_lintr.vader
index a2791c4d..8f6fb88f 100644
--- a/test/linter/test_lintr.vader
+++ b/test/linter/test_lintr.vader
@@ -7,7 +7,7 @@ After:
Execute(The default lintr command should be correct):
AssertLinterCwd '%s:h'
AssertLinter 'Rscript',
- \ 'Rscript --vanilla -e '
+ \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e '
\ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
\ . 'lint(cache = FALSE, commandArgs(TRUE), '
\ . 'with_defaults())')
@@ -17,7 +17,7 @@ Execute(The lintr options should be configurable):
let b:ale_r_lintr_options = 'with_defaults(object_usage_linter = NULL)'
AssertLinter 'Rscript',
- \ 'Rscript --vanilla -e '
+ \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e '
\ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
\ . 'lint(cache = FALSE, commandArgs(TRUE), '
\ . 'with_defaults(object_usage_linter = NULL))')
@@ -27,7 +27,7 @@ Execute(If the lint_package flag is set, lintr::lint_package should be called):
let b:ale_r_lintr_lint_package = 1
AssertLinter 'Rscript',
- \ 'Rscript --vanilla -e '
+ \ 'Rscript --no-save --no-restore --no-site-file --no-init-file -e '
\ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
\ . 'lint_package(cache = FALSE, '
\ . 'linters = with_defaults())')