We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
./tests/testthat/test-style.R
R/style.R
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.
The text was updated successfully, but these errors were encountered:
I note that someone has raised a related issue in #1413
Sorry, something went wrong.
Using current lintr-master (1a170f5) on the same R package
lintr::lint_package() Error in file_exclusion[[which(names2(file_exclusion) == "")]] : attempt to select less than one element in get1index
is_excluded_file()
Thanks for reporting. Can you test #1447 on your package just to be sure the bug is squashed for good?
Thanks. This works great.
Successfully merging a pull request may close this issue.
I have a package with
./tests/testthat/test-style.R
andR/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-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.
The text was updated successfully, but these errors were encountered: