terraform/command/views
Alisdair McDiarmid d9d88b9243 cli: Add comprehensive JSON diagnostic structure
This commit adds a comprehensive JSON format for diagnostics, which
ensures that all current diagnostic output can be semantically
represented in a machine-readable format. The diagnostic formatter
interface remains unchanged, but it first transforms its input via the
JSON format to ensure that there is only one code path for creating the
diagnostic data.

The JSON diagnostic renderer extracts the non-presentational logic from
the format package, and returns a structure which can either be
marshaled into JSON or rendered as text. The resulting text diagnostic
output is unchanged for all cases covered by unit tests and my own
manual testing.

Included in this commit are a number of golden reference files for the
marshaled JSON output of a diagnostic. This format should change rarely
if at all, and these are in place to ensure that any changes to the
format are intentional and considered.
2021-03-12 13:12:37 -05:00
..
json cli: Add comprehensive JSON diagnostic structure 2021-03-12 13:12:37 -05:00
apply.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
apply_test.go cli: Migrate apply to command views 2021-02-22 11:47:40 -05:00
hook_count.go cli: Migrate apply to command views 2021-02-22 11:47:40 -05:00
hook_count_test.go cli: Migrate apply to command views 2021-02-22 11:47:40 -05:00
hook_ui.go cli: Fix misapplied terminal colors on run logs 2021-02-16 15:05:22 -05:00
hook_ui_test.go cli: Fix misapplied terminal colors on run logs 2021-02-16 15:05:22 -05:00
operation.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
operation_test.go backend/local: Replace CLI with view instance 2021-02-18 12:08:08 -05:00
output.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
output_test.go views: Expand test coverage for views.Output 2021-02-16 08:48:31 -05:00
plan.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
plan_test.go cli: Migrate plan to command views 2021-02-23 10:09:25 -05:00
refresh.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
refresh_test.go cli: Migrate refresh to command views 2021-02-22 11:58:52 -05:00
show.go backend/local: Replace CLI with view instance 2021-02-18 12:08:08 -05:00
state_locker.go views: Fix missing source in diagnostic output 2021-02-26 16:43:03 -05:00
test.go command: Experimental "terraform test" command 2021-02-22 14:21:45 -08:00
test_test.go command: Experimental "terraform test" command 2021-02-22 14:21:45 -08:00
view.go views: Remove outdated comment 2021-02-25 09:34:32 -05:00