spaces_left_parentheses_linter: Spaces before parentheses linter

View source: R/spaces_left_parentheses_linter.R

spaces_left_parentheses_linterR Documentation

Spaces before parentheses linter

Description

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

Usage

spaces_left_parentheses_linter()

Tags

default, readability, style

See Also

Examples

# will produce lints
lint(
  text = "if(TRUE) x else y",
  linters = spaces_left_parentheses_linter()
)

# okay
lint(
  text = "if (TRUE) x else y",
  linters = spaces_left_parentheses_linter()
)


r-lib/lintr documentation built on Dec. 20, 2024, 7:24 p.m.