styler::style_text('
while ({
bad <- grepl("_", z)
any(bad)
}) {
TRUE
}
')
# while (
# {
# bad <- grepl("_", z)
# any(bad)
# })
# {
# TRUE
# }
The { is bumped but the style rules dictate { should be on the line with ):
{ should be the last character on the line. Related code (e.g., an if clause, a function declaration, a trailing comma, …) must be on the same line as the opening brace.
AFAIK clauses like ({ ... }) are generally fine, so I'm also not sure why ( and { were separated...