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 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:
exclude_tags = "deprecated"
exclude_tags = NULL
nrow(available_linters(tags = "deprecated", exclude_tags = NULL)) # [1] 7
I see two options:
"deprecated"
if (missing(exclude_tags) && identical(tags, "deprecated")) exclude_tags <- NULL
exclude_tags <- setdiff(exclude_tags, tags)
exclude_tags
tags
Either way, it will simplify the implementation for #1958.
Any thoughts?
The text was updated successfully, but these errors were encountered:
I think option 2 is a more elegant solution (what the code says, not the description; i.e. tags should take priority).
Sorry, something went wrong.
hmm it looks like we've already declared the opposite prioritization for linters_with_tags():
linters_with_tags()
lintr/tests/testthat/test-with.R
Line 47 in 9038957
The change in behavior makes sense to me -- we should find another way to produce a zero-row output.
Successfully merging a pull request may close this issue.
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 <- NULL
exclude_tags <- setdiff(exclude_tags, tags)
, i.e.,exclude_tags
takes priority overtags
if there's any collisionEither way, it will simplify the implementation for #1958.
Any thoughts?
The text was updated successfully, but these errors were encountered: