You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since R 4.0.0 the pattern deparse1(substitute(x)) seems to be recommended over deparse(substitute(x)). See the PR for examples: https://bugs.r-project.org/show_bug.cgi?id=17671 but this most likely will have many false positives.
The text was updated successfully, but these errors were encountered:
m-muecke
changed the title
Lint deparse(substitute(x)) for deparse1(substitute(x))`
Lint deparse(substitute(x)) for deparse1(substitute(x))Jun 20, 2024
I think deparse(substitute(x)) is error-prone, hence why deparse1() is recommended... but I'm not sure there's no legitimate need for plain deparse(substitute(x)), hence a lot of false positives like you say. I tend to shy away from linters that have a lot of built-in false positives, especially without a really good classification of good vs. bad use cases that we can convey concisely to the user in a lint message. Do you want to flesh something like that out?
Reconstructing deparse1(), i.e. paste(deparse(.), collapse = " "), is definitely lintable, OTOH.
Since R 4.0.0 the pattern
deparse1(substitute(x))
seems to be recommended overdeparse(substitute(x))
. See the PR for examples: https://bugs.r-project.org/show_bug.cgi?id=17671 but this most likely will have many false positives.The text was updated successfully, but these errors were encountered: