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

Backport of Standardise how blank lines are added to plan for unchanged blocks into v1.2 #31346

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #31330 to be assessed for backporting due to the inclusion of the label 1.2-backport.

The below text is copied from the body of the original PR.


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.

@teamterraform teamterraform force-pushed the backport/liamcervante/blank-line-formatting/seriously-engaging-koi branch from 07d9152 to 555ca4b Compare June 30, 2022 12:30
@liamcervante liamcervante merged commit 185a385 into v1.2 Jun 30, 2022
@liamcervante liamcervante deleted the backport/liamcervante/blank-line-formatting/seriously-engaging-koi branch June 30, 2022 12:36
@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.

@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants