Description
Follow-up to #2077.
That PR is conservative about what filter()
calls to include. We do not match filter()
unless it's namespace-qualified, to avoid false positives involving stats::filter()
. I'm not so familiar with stats::filter()
, but my understanding is it'd be really weird to use &
there too, but in any case the lint message would look strange.
We might parameterize this instead to increase the reach, e.g. assume_dplyr
, when TRUE
all filter()
calls are matched, or allow_conjunct_filter
, when TRUE
all filter()
calls are skipped.
Another less conservative option: assume filter()
is dplyr::filter()
, unless it's namespace-qualified as coming from another namespace. That gives users an out if needed, but defaults to assuming everything comes from dplyr
(which seems most likely, among users who'd have this lint active)