Skip to content

brace-parens and strict = FALSE #248

Closed

Description

@krlmlr
styler::style_text("list(\na = function() {\n  NULL}\n)")
#> list(
#>   a = function() {
#>     NULL
#>   }
#> )
styler::style_text("list(\na = function() {\n  NULL}\n)", strict = FALSE)
#> list(
#>   a = function() {
#>     NULL
#>   })

Why does strict = FALSE attach the paren to the closing brace? Quite invasive... ;-)

Use case: Styling testthat with strict = FALSE first (#240).

Activity

  1. lorenzwalthert commented on Oct 23, 2017

    @lorenzwalthert
    Collaborator

    We can add make remove_line_break_before_round_closing() inactive for strict = FALSE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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