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

FormatWriter: generalize alignment of infix exprs #3375

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

kitbellew
Copy link
Collaborator

No description provided.

@kitbellew kitbellew changed the title FormatWriter: generalize alignment of infix apps FormatWriter: generalize alignment of infix exprs Nov 11, 2022
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.

Looks good, I just left one comment, which I am not sure about.

foooooo % barrrr %
bazz %
"test",
foo %%% bar % baz % "test"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't %%% be aligned also?

Suggested change
foo %%% bar % baz % "test"
foo %%% bar % baz % "test"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not really, since the multiline last expression has interrupted the sequence of aligned lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also, as you could see, the code change didn't change the outcome of the tests, which is why they were added: to prove nothing changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense! I was mostly wondering what the behaviour should be in that case

@kitbellew kitbellew merged commit 22a16d2 into scalameta:master Nov 14, 2022
@kitbellew kitbellew deleted the 3375 branch November 14, 2022 15:02
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.

None yet

2 participants