hashivim / vim-terraform

basic vim/terraform integration
http://hashivim.github.io/vim-terraform
ISC License
1.07k stars 111 forks source link

add: enabled format for `*.tftest.hcl` files #188

Closed ponkio-o closed 9 months ago

ponkio-o commented 9 months ago

Hi, I added file format for testing framework to terraform_fmt_on_save. ref. https://github.com/hashicorp/terraform/pull/33576

dimbleby commented 9 months ago

terraform fmt is a terraform formatter, not a general purpose hcl formatter. cf https://github.com/hashivim/vim-terraform/pull/177#issuecomment-1279785677

ponkio-o commented 9 months ago

@dimbleby Thank you for your reply!

terraform fmt is a terraform formatter, not a general purpose hcl formatter

Yes, I same understood too. But *.tftest.hcl(Not *.hcl or *.terragrunt.hcl) was supported by upstream version of hashicorp/terraform. See https://github.com/hashicorp/terraform/pull/33576/files#diff-1276f881ce998d18fc1bca929386734d9f3f17439662981371fb88009b4f98e6R34

So I think no problem adding to terraform_fmt_on_save. because the *.tftest.hcl is ext for hashicorp/terraform.

How do you think?

dimbleby commented 9 months ago

ah, great, if terraform wants to support these files then I've no reason to argue with that - thanks!