I took a more extreme version of this approach for a project that keeps many R
packages in a monorepo and checks them all at once, where we do a lot of saying
“let’s ignore this warning _in this package_ until someone has a chance to fix
it properly, but still fail the build if it shows up in _o
I’m replying 8 months later to say a proper thanks to Duncan for the function
below. It’s been helping me clean up duplicate (and not-quite duplicate!)
function definitions in amateur code ever since, and I’m reminded to say so now
because I just passed it along to Ben Zipperer in response to a
It’s completely reasonable to decline to do extra work to support it, but at
the same time: Qualified calls are widely used and recommended, and users are
also being completely reasonable when they try to use them (probably without
checking the manual!) and expect them to work.
Would there be a
Hopefully to too much of a tangent: A related problem this check doesn’t catch
is accidental top-level redefinitions in package code, such as
## a.R:
helper <- function() 1
f <- function() {
helper()
}
# “cool, f() must return 1"
## b.R:
helper <- function(x) 2
g <- function() {
helper()
}
# “