lint(linters = object_usage_linter(), "
foo <- function() {
`%++%` <- `+`
glue('{x %++% y}')
}")
# <text>:3:3: warning: [object_usage_linter] local variable '%++%' assigned but may not be used
# `%++%` <- `+`
# ^~~~~~
The problem is we only look for SYMBOL or SYMBOL_FUNCTION_CALL in the parse tree of the glue expression:
|
symbols <- gsub("^`(.*)`$", "\\1", parse_data$text[parse_data$token %in% c("SYMBOL", "SYMBOL_FUNCTION_CALL")]) |
#2068 already fixed this by using all.vars() instead.