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

FormatOps: implement binPack.parentCtor=ForceBreak #4550

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

kitbellew
Copy link
Collaborator

Fixes #4542.

maxColumn = 100
binPack.parentConstructors = ForceBreak
===
class SomeClass(a: Int, b: Double, c: String)
Copy link
Contributor

Choose a reason for hiding this comment

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

How would it work with:

class SomeClass(a: Int, b: Double, c: String) extends SomeBaseClass with SomeTrait

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, let me add tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done. but the answer is, obviously, that it will do the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM

maxColumn = 100
binPack.parentConstructors = ForceBreak
===
class SomeClass(a: Int, b: Double, c: String)
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@kitbellew kitbellew merged commit 042fbf6 into scalameta:main Nov 15, 2024
21 checks passed
@kitbellew kitbellew deleted the 4542 branch November 15, 2024 16:16
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.

Force newline before extends regardless of class/trait definition
2 participants