-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
Description
When using the 3.0.0 CRAN release of lintr, listing with the following .lintr
file results in an unexpected error:
linters: linters_with_defaults(
line_length_linter(100)
)
exclude: list(
"bad.R" = list(
1, # global exclusions are unnamed
line_length_linter = 4:6
)
)
(adapted from the Get Started page)
Error message when running lint_dir()
:
$ Rscript -e 'lintr::lint_dir(".")'
Error in `[.data.frame`(rex::re_matches(lines, exclude, locations = TRUE), :
undefined columns selected
Calls: <Anonymous> ... do.call -> <Anonymous> -> lapply -> FUN -> [ -> [.data.frame
Execution halted
To reproduce: run Rscript -e 'lintr::lint_dir(".")'
from a directory containing the .lintr
file above, and the following bad.R
:
tmp = "value"
# regular comment
# really long comment ............................................................................................................
# really long comment ............................................................................................................
# really long comment ............................................................................................................
# regular comment