Check that there is a space between right parenthesis and a body expression.
See also
linters for a complete list of linters available in lintr.
Examples
# will produce lints
lint(
text = "function(x)x + 1",
linters = paren_body_linter()
)
#> <text>:1:12: style: [paren_body_linter] Put a space between a right parenthesis and a body expression.
#> function(x)x + 1
#> ^~~~~
# okay
lint(
text = "function(x) x + 1",
linters = paren_body_linter()
)
#> ℹ No lints found.