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

Standardise how blank lines are added to plan for unchanged blocks #31330

Merged
merged 2 commits into from Jun 30, 2022

Conversation

liamcervante
Copy link
Member

Closes #28217

Fix the issue where multiple blank lines were inserted into the plan for every unchanged block type.

There are two cases for unchanged blocks, either the previous block is of the same type or it's of a different type. Previously, if they were the same type there would be no blank line and if they were different there would be a blank line. However, this was confusing because the unchanged blocks are grouped regardless of type so whether a blank line appears or not doesn't always actually mean anything.

So now, this is standardised and there is always a blank line before any unchanged block statement. New unit tests have been added to verify this, and some existing tests have been modified to reflect the new standard.

@liamcervante liamcervante requested review from alisdair and a team June 28, 2022 12:04
Copy link
Member

@alisdair alisdair left a comment

Choose a reason for hiding this comment

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

This is great! Verified locally and the fix makes sense to me.

@liamcervante liamcervante added the 1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jun 30, 2022
@liamcervante liamcervante merged commit acb79a7 into main Jun 30, 2022
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@wyardley
Copy link

Woo! Awesome. Thanks.

@liamcervante liamcervante deleted the liamcervante/blank-line-formatting branch June 30, 2022 12:36
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

extra spaces in new diff output
3 participants