I find the current behavior a bit strange:
available_linters(tags = "deprecated")
# [1] linter package tags
# <0 rows> (or 0-length row.names)
Almost surely, that's not what the user wanted. The problem is exclude_tags = "deprecated" by default, so we need to also specify exclude_tags = NULL:
nrow(available_linters(tags = "deprecated", exclude_tags = NULL))
# [1] 7
I see two options:
- Special case
"deprecated" with an if (missing(exclude_tags) && identical(tags, "deprecated")) exclude_tags <- NULL
- Always run
exclude_tags <- setdiff(exclude_tags, tags), i.e., exclude_tags takes priority over tags if there's any collision
Either way, it will simplify the implementation for #1958.
Any thoughts?
I find the current behavior a bit strange:
Almost surely, that's not what the user wanted. The problem is
exclude_tags = "deprecated"by default, so we need to also specifyexclude_tags = NULL:I see two options:
"deprecated"with anif (missing(exclude_tags) && identical(tags, "deprecated")) exclude_tags <- NULLexclude_tags <- setdiff(exclude_tags, tags), i.e.,exclude_tagstakes priority overtagsif there's any collisionEither way, it will simplify the implementation for #1958.
Any thoughts?