Skip to contents

Check that all left parentheses have a space before them unless they are in a function call.

Usage

spaces_left_parentheses_linter()

See also

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()
)