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()
)
#> <text>:1:3: style: [spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.
#> if(TRUE) x else y
#>   ^

# okay
lint(
  text = "if (TRUE) x else y",
  linters = spaces_left_parentheses_linter()
)
#>  No lints found.