Spaces before parentheses linter
Source:R/spaces_left_parentheses_linter.R
spaces_left_parentheses_linter.Rd
Check that all left parentheses have a space before them unless they are in a function call.
See also
linters for a complete list of linters available in lintr.
Examples
# will produce lints
lint(
text = "if(TRUE) x else y",
linters = spaces_left_parentheses_linter()
)
#> ::warning file=<text>,line=1,col=3::file=<text>,line=1,col=3,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.
# okay
lint(
text = "if (TRUE) x else y",
linters = spaces_left_parentheses_linter()
)