Skip to content

Conversation

kitbellew
Copy link
Collaborator

No description provided.

@kitbellew kitbellew force-pushed the 2694 branch 4 times, most recently from e42bf14 to 46201c2 Compare August 22, 2021 17:57
@kitbellew kitbellew requested a review from tgodzik August 22, 2021 18:17
@kitbellew kitbellew changed the title FormatWriter: add parameter to skip single blank before or after all statements FormatWriter: add parameter to set number of blanks before or after all statements Aug 24, 2021
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, though I am not sure I understand what is the intended behaviour. Left a question about it.

newlines.topLevelBodyMinStatements = 1
newlines.topLevelBodyIfMinStatements = [before]
newlines.topLevelStatementBlankLines = [
{ blanks = { before = -1, after = 1 } }
Copy link
Contributor

Choose a reason for hiding this comment

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

So here, before = -1 is being ignored due to newlines.topLevelBodyIfMinStatements = [before]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

correct, that's the test, the higher number wins.

@kitbellew kitbellew merged commit 8ec8105 into scalameta:master Aug 24, 2021
@kitbellew kitbellew deleted the 2694 branch August 24, 2021 16:29
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