Learn R Programming

artma (version 0.3.3)

indentation_guard_clause_linter: Allow Guard Clause if Statements Without Braces

Description

Wraps lintr::indentation_linter() to avoid emitting indentation warnings for guard-clause style if statements where a single, indented expression immediately follows the condition on the next line. This keeps the rest of the indentation behavior intact while permitting the brace-less guard clause convention adopted in the codebase.

Usage

indentation_guard_clause_linter(indent = 2L, ...)

Arguments

indent

Integer number of spaces to use for indentation checks.

...

Additional arguments forwarded to lintr::indentation_linter().