I have a package with ./tests/testthat/test-style.R and R/style.R and am trying to use the file/linter-specific exclusion setup described here: https://lintr.r-lib.org/articles/lintr.html#excluding-files-completely
If I have a .lintr config at package-root with the contents:
linters: linters_with_defaults()
exclusions: list(
"tests/testthat/test-style.R" = list(semicolon_linter = Inf)
)
The following error arises:
Error in file_exclusion[[names2(file_exclusion) == ""]] :
attempt to select less than one element in integerOneIndex
This results from the following call (from lintr::lint_dir):
path <- "/home/me/blah"
files <- file.path(path, c("R/style.R", "tests/testthat.R", "tests/testthat/test-style.R"))
exclusions <- list(list(semicolon_linter = Inf))
names(exclusions) <- file.path(path, "tests/testthat/test-style.R")
lintr:::drop_excluded(files, exclusions)
#> Error in file_exclusion[[names2(file_exclusion) == ""]] :
#> attempt to select less than one element in integerOneIndex
Apologies if I've misunderstood this new exclusions syntax.
I have a package with
./tests/testthat/test-style.RandR/style.Rand am trying to use the file/linter-specific exclusion setup described here: https://lintr.r-lib.org/articles/lintr.html#excluding-files-completelyIf I have a .lintr config at package-root with the contents:
The following error arises:
This results from the following call (from lintr::lint_dir):
Apologies if I've misunderstood this new exclusions syntax.