Sometimes you just want to use ... to force your users to fully name
the details arguments. This function warns if ... is not empty.
Environment in which to look for ....
The action to take when the dots have not been used. One of
rlang::abort(), rlang::warn(), rlang::inform() or rlang::signal().
f <- function(x, ..., foofy = 8) {
check_dots_empty()
x + foofy
}
try(f(1, foof = 4))
#> Error in f(1, foof = 4) : `...` must be empty.
#> ✖ Problematic argument:
#> • foof = 4
f(1, foofy = 4)
#> [1] 5