Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for RedundantBraces settings #1945

Merged
merged 4 commits into from
May 4, 2020

Conversation

poslegm
Copy link
Collaborator

@poslegm poslegm commented May 3, 2020

No description provided.

@poslegm poslegm requested a review from kitbellew May 3, 2020 16:30
Copy link
Collaborator

@kitbellew kitbellew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one optional comment, and one rant to ignore.

s"user id is ${id}"
```

`rewrite.redundantBraces.parensForOneLineApply` is `true` by default for `edition` >= 2020-01. See also [newlines.afterCurlyLambda](http://localhost:3000/scalafmt/docs/configuration.html#newlinesaftercurlylambda)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess you could mention that it only works if afterCurlyLambda = squash specifically.

```

```scala mdoc:defaults
rewrite.redundantBraces.maxLines
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rant. this parameter has an off-by-one bug. it's not maxLines, it's maxBreaks (i.e., lines - 1).

@poslegm poslegm merged commit db38ae4 into scalameta:master May 4, 2020
@poslegm poslegm deleted the generic-expr-doc branch May 4, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants