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
In this case, I am staring at what lintr is telling me and thinking "How would I even do that?", so if there's an easy fix, I think we should do it and avoid needless confusion. I think (somewhat speculative) it's more uncommon for operators to have alphanumerics than not, so conditional on writing operators, it seems this warning is likely to arise.
Yeah, I see that happening.
What should happen for e.g. %T>% from {magrittr}?
Maybe a new option check_operators = TRUE could be added and that would allow you to do whatever with objects that are named %something%?
I mean you'd certainly want a lint if a variable named `++` were used, no?
Activity
AshesITR commentedon Nov 28, 2020
Such functions should be rare enought to warrant an occasional
# nolintimo.Note that
`%my_op%` <- function(x, y) x + ylints fineMichaelChirico commentedon Nov 28, 2020
In this case, I am staring at what
lintris telling me and thinking "How would I even do that?", so if there's an easy fix, I think we should do it and avoid needless confusion. I think (somewhat speculative) it's more uncommon for operators to have alphanumerics than not, so conditional on writing operators, it seems this warning is likely to arise.AshesITR commentedon Nov 28, 2020
Yeah, I see that happening.
What should happen for e.g.
%T>%from {magrittr}?Maybe a new option
check_operators = TRUEcould be added and that would allow you to do whatever with objects that are named%something%?I mean you'd certainly want a lint if a variable named
`++`were used, no?MichaelChirico commentedon Nov 29, 2020
Not a perfect search but a grep-based approach on my CRAN mirror turned up these operators:
with alphanumeric
without alphanumeric
My gut is to treat
%++%differently than++(by default, don't really see the need for an option). A matter of how hard it is to implement.