You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint(linters= object_usage_linter(), R"{foo <- function(f) { withr::with_connection(list(myCon = f), writeLines(letters, myCon))}}")
# <text>:3:63: warning: [object_usage_linter] no visible binding for global variable 'myCon'# withr::with_connection(list(myCon = f), writeLines(letters, myCon))# ^~~~~
Obviously {codetools} does not (and probably will not) support myCon being defined as valid in this context by {withr}, but we can supplement to remove this false positive as we do in a few similar cases. {withr} is popular enough (100+ revdeps on CRAN) that this special case is warranted.
The text was updated successfully, but these errors were encountered:
Obviously {codetools} does not (and probably will not) support
myCon
being defined as valid in this context by {withr}, but we can supplement to remove this false positive as we do in a few similar cases. {withr} is popular enough (100+ revdeps on CRAN) that this special case is warranted.The text was updated successfully, but these errors were encountered: