Skip to content

command/format: Reduce extra whitespaces & new lines#21334

Merged
radeksimko merged 1 commit intomasterfrom
b-cmd-show-reduce-whitespaces
Jun 14, 2019
Merged

command/format: Reduce extra whitespaces & new lines#21334
radeksimko merged 1 commit intomasterfrom
b-cmd-show-reduce-whitespaces

Conversation

@radeksimko
Copy link
Copy Markdown
Member

The original goal was to reduce newlines between each output in terraform show, as demonstrated in one of the tests cases, but I also found one extra trailing whitespace printing for untainted (most) resources.

@radeksimko radeksimko requested a review from a team May 16, 2019 13:59
@mildwonkey
Copy link
Copy Markdown
Contributor

mildwonkey commented May 16, 2019

Off topic, but since you are in there, what do you think about reducing the newlines between resources and outputs? There are currently 3 and I think it looks awkward:

resource "random_pet" "my_pet" {
    id        = "main-fox"
    length    = 2
    separator = "-"
}


Outputs:```

(since this doesn't directly relate feel free to ignore this!)

@radeksimko
Copy link
Copy Markdown
Member Author

@mildwonkey Sure, are 2 lines ok, or would you go as far as 1 empty line?

I'm slightly more inclined to keeping it at 2 as we use 1 line for separating resources and this is whole new section, so the separation should be a bit more prominent, IMO?

@wyardley
Copy link
Copy Markdown

Does this / could this also fix #14858, which has been open for 2 years (!!!) to remove a single extra newline after terraform --version output?

Copy link
Copy Markdown
Contributor

@pselle pselle left a comment

Choose a reason for hiding this comment

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

Read through this a few times, and looks good to me! Looks like prior comments are related to making an additional change, and this PR already does a couple extra hoops (although, do have at, if you want to do the 3=>2 change)

@radeksimko radeksimko merged commit f342824 into master Jun 14, 2019
@radeksimko radeksimko deleted the b-cmd-show-reduce-whitespaces branch June 14, 2019 13:32
@ghost
Copy link
Copy Markdown

ghost commented Jul 25, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants