lint(text="foo <- 2", linters=undesirable_function_linter(c(foo=NA)))
# <text>:1:1: style: [undesirable_function_linter] Avoid undesirable function "foo".
# foo <- 2
# ^~~
That looks like a false positive to me. If anything, that should be covered by object_overwrite_linter() if the user wants to avoid masking foo.