kmoe
5907a86301
command/format: Correctly quote diff object keys ( #30766 )
...
When rendering a diff, we should quote object attribute names if the
string representation is not a valid identifier. While this is not
strictly necessary, it makes the diff output more closely resemble the
configuration language, which is less confusing.
This commit applies to both top-level schema attributes and any object
value attributes. We use a simplistic "%q" Go format string to quote the
strings, which is not strictly identical to HCL's quoting requirements,
but is the pattern used elsewhere in HCL and Terraform.
Co-Authored-By: Katy Moe <katy@katy.moe >
Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com >
2022-04-01 10:09:28 +01:00
..
2022-01-13 11:00:03 -06:00
2021-09-29 13:36:59 -07:00
2021-08-17 15:20:05 -07:00
2022-01-05 14:31:04 -08:00
2022-04-01 10:09:28 +01:00
2022-02-19 01:55:09 +09:00
2022-03-17 09:35:36 -04:00
2021-10-28 16:00:02 -04:00
2021-10-06 11:13:06 -04:00
2022-03-31 13:42:42 -04:00
2022-03-30 10:04:48 -04:00
2021-09-10 14:56:49 -07:00
2021-05-17 14:09:07 -07:00
2021-10-13 17:28:14 -04:00
2021-10-29 21:23:28 -05:00
2022-01-08 14:41:20 +11:00
2022-03-31 13:42:42 -04:00
2021-08-17 15:20:05 -07:00
2021-10-28 11:51:39 -04:00
2021-05-17 14:09:07 -07:00
2021-10-29 14:41:05 -04:00
2021-05-17 14:09:07 -07:00
2021-11-11 12:28:10 +00:00
2021-11-11 12:28:10 +00:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:09 -05:00
2021-10-01 14:43:58 -07:00
2021-10-28 19:29:09 -05:00
2021-12-17 15:30:21 -08:00
2022-03-25 14:31:52 +00:00
2021-10-28 11:51:39 -04:00
2021-10-28 19:29:13 -05:00
2021-12-01 11:43:41 -06:00
2021-10-25 15:08:10 -04:00
2022-03-30 17:50:08 -04:00
2021-11-11 12:28:16 +00:00
2021-10-01 14:43:58 -07:00
2021-05-17 14:09:07 -07:00
2021-10-05 10:59:59 -07:00
2022-03-31 13:42:42 -04:00
2021-05-17 14:09:07 -07:00
2022-03-31 13:42:42 -04:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:09 -05:00
2021-10-01 14:43:58 -07:00
2022-03-30 09:52:49 +01:00
2021-10-01 14:43:58 -07:00
2021-09-10 14:56:49 -07:00
2021-05-19 12:56:16 -04:00
2021-05-19 12:56:16 -04:00
2021-05-19 12:56:16 -04:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:09 -05:00
2021-10-28 19:29:09 -05:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:21 -05:00
2022-02-19 00:44:48 +09:00
2022-01-13 11:00:03 -06:00
2021-10-28 19:29:09 -05:00
2021-10-28 19:29:09 -05:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:09 -05:00
2021-05-17 14:09:07 -07:00
2022-03-31 13:42:42 -04:00
2022-03-31 13:42:42 -04:00
2021-11-11 12:28:10 +00:00
2021-05-17 14:09:07 -07:00
2021-09-21 22:26:16 -05:00
2021-05-17 14:09:07 -07:00
2021-05-17 14:09:07 -07:00
2021-10-28 19:29:09 -05:00
2021-05-17 14:09:07 -07:00
2021-08-30 13:59:14 -07:00
2021-10-13 13:54:11 -07:00
2021-10-13 13:54:11 -07:00
2022-01-08 14:41:20 +11:00
2021-10-28 19:29:09 -05:00
2022-01-08 14:41:20 +11:00
2022-01-08 14:41:20 +11:00