# will produce lints
lint(
text = "foo <- function() { x <- 1 }",
linters = object_usage_linter()
)
# okay
lint(
text = "foo <- function(x) { x <- 1 }",
linters = object_usage_linter()
)
lint(
text = "foo <- function() { x <- 1; return(x) }",
linters = object_usage_linter()
)
Run the code above in your browser using DataLab