terraform/command/views/json
Alisdair McDiarmid 3a9b369b43 views/json: Fix diag crash with invalid highlight
Some diagnostic sources (I'm looking at you, HCL) fail to set the end of
the subject range. This is a bug in those code paths, but we can ensure
that we generate valid JSON diagnostics by checking for it here.

By doing so before the range normalization, we ensure that we generate a
unit width highlight whenever possible, so that at least something
useful is displayed.
2021-05-04 08:35:42 -04:00
..
testdata/diagnostic views/json: Fix diag crash with invalid highlight 2021-05-04 08:35:42 -04:00
change.go command/views: Add reason to JSON planned change 2021-05-03 06:49:42 -04:00
change_summary.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00
diagnostic.go views/json: Fix diag crash with invalid highlight 2021-05-04 08:35:42 -04:00
diagnostic_test.go views/json: Fix diag crash with invalid highlight 2021-05-04 08:35:42 -04:00
hook.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00
message_types.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00
output.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00
output_test.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00
resource_addr.go cli: Add JSON logs for operations commands 2021-04-30 11:37:36 -04:00