From 626624af7b571e693c1006456ecddfdc464613d5 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Tue, 16 Dec 2025 14:17:38 +1100 Subject: [PATCH] Adding tf to hcl format names --- .gitignore | 1 + acceptance_tests/inputs-format.sh | 58 +++++++++++++++++++++++++++++++ examples/sample.tf | 27 ++++++++++++++ pkg/yqlib/format.go | 2 +- 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 examples/sample.tf diff --git a/.gitignore b/.gitignore index 8bedd020..f51c4d8c 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ yq*.snap test.yml test*.yml +test*.tf test*.xml test*.toml test*.yaml diff --git a/acceptance_tests/inputs-format.sh b/acceptance_tests/inputs-format.sh index 60d0bd11..282b5287 100755 --- a/acceptance_tests/inputs-format.sh +++ b/acceptance_tests/inputs-format.sh @@ -6,6 +6,7 @@ setUp() { rm test*.csv 2>/dev/null || true rm test*.tsv 2>/dev/null || true rm test*.xml 2>/dev/null || true + rm test*.tf 2>/dev/null || true } testInputProperties() { @@ -255,4 +256,61 @@ EOM assertEquals "$expected" "$X" } +testInputTerraform() { + cat >test.tf <test.tf <