lint(linters=return_linter(return_style="explicit"), R"(
foo <- function(y,
x = {
y <- sqrt(y)
y + 1
}) {
return(x + y)
})")
# <text>:5:19: warning: [return_linter] All functions must have an explicit return().
# y + 1
# ^
The XPath for finding the function body needs to be adjusted a bit I reckon.
The XPath for finding the function body needs to be adjusted a bit I reckon.