terraform/command/format
Martin Atkins e865faf318 command: Better visual hierarchy for diagnostics
I frequently see people attempting to ask questions about Terraform's
error and warning messages but either only copying part of the message or
accidentally copying a surrounding paragraph that isn't part of the
message.

While I'm sure some of these are just "careless" mistakes, I've also
noticed that this has sometimes overlapped with someone asking a question
whose answer is written directly in the part of the message they didn't
include when copying, and so I have a theory that our current output
doesn't create a good enough visual hierarchy for sighted users to
understand where the diagnostic messages start and end when we show them
in close proximity to other content, or to other diagnostic messages.
As a result, some folks fail to notice the relevant message that might've
answered their question.

I tried a few different experiments for different approaches here, such
as adding more horizontal rules to the output and coloring the detail
text differently, but the approach that felt like the nicest compromise
to me was what's implemented here, which is to add a vertical line
along the left edge of each diagnostic message, colored to match with the
typical color we use for each diagnostic severity. This means that the
diagnostics end up slightly indented from what's around them, and the
vertical line seems to help subtly signal how we intended the content
to be grouped together.
2021-01-14 09:50:22 -08:00
..
diagnostic.go command: Better visual hierarchy for diagnostics 2021-01-14 09:50:22 -08:00
diagnostic_test.go command: Better visual hierarchy for diagnostics 2021-01-14 09:50:22 -08:00
diff.go Merge pull request #27081 from hashicorp/jbardin/staticcheck 2020-12-02 15:43:10 -05:00
diff_test.go command/format: concise diff is now the default (#27079) 2020-12-02 15:42:41 -05:00
format.go command/format: a package for formatting plans/state for output 2017-01-26 14:33:49 -08:00
object_id.go command: Reinstate object ids in the UIHook progress logs 2018-10-16 19:14:11 -07:00
object_id_test.go Updates after running `make fmt` with Go v1.11.1 2018-10-17 14:11:08 -07:00
state.go Merge pull request #27081 from hashicorp/jbardin/staticcheck 2020-12-02 15:43:10 -05:00
state_test.go update MockProvider usage 2021-01-12 17:47:55 -05:00
trivia.go command/format: Don't try to fill the last terminal column 2021-01-13 15:37:04 -08:00