would it be possible to add an option to the object_usage_linter so it does not check the inside of with expressions?
running lintr::lint("this_file.R")
#this_file.R
test_fun <- function(df) {
with(df, first_var + second_var)
}
throw the following warnings:
this_file.R:2:12: warning: [object_usag e_linter] no visible binding for global variable ‘first_var’ with(df, first_var + second_var)
this_file.R:2:24: warning: [object_usag e_linter] no visible binding for global variable ‘second_var’ with(df, first_var + second_var)
but strangely no such warning appear with this code:
df <- readRDS("df_path.rds")
with(df, first_var + second_var)
Thanks
would it be possible to add an option to the
object_usage_linterso it does not check the inside ofwithexpressions?running
lintr::lint("this_file.R")throw the following warnings:
but strangely no such warning appear with this code:
Thanks