# will produce lints
lint(
text = "function(x) x %>% return()",
linters = pipe_return_linter()
)
# okay
code <- "function(x) {\n y <- sum(x)\n return(y)\n}"
writeLines(code)
lint(
text = code,
linters = pipe_return_linter()
)
Run the code above in your browser using DataLab