Skip to content

Why is the indent different in functions without braces? #535

@krlmlr

Description

@krlmlr

I'm using a hammer h() to turn off R CMD check warnings for functions that use NSE. Is there an easy way to make the bad (and then perhaps also the use_case) example behave?

styler::style_text("
good <- function() {
  h(
    code
  )
}
bad <- function() h(
  code
)
use_case <- function() h(~ {
  code
})
")
#> 
#> good <- function() {
#>   h(
#>     code
#>   )
#> }
#> bad <- function() h(
#>     code
#>   )
#> use_case <- function() h(~ {
#>     code
#>   })

Created on 2019-08-05 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions