Add Terraform filetypes
https://github.com/beyondgrep/ack3/blob/dev/CONTRIBUTING.md:
- The name of the filetype: Terraform
- What the definition of the filetype would be, taken from the .ackrc file that you've been using: .tf, .tfvars
- URL of a web page that discusses what the filetype is: https://www.terraform.io/
- What the file contains, and why it should be a filetype: terraform configuration, which is its own domain language
- How widely used this filetype will be: Terraform is a quite popular IaC tool
What the definition of the filetype would be, taken from the .ackrc file that you've been using: .tf, .tfvars
Can you please paste your .ackrc in here?
URL of a web page that discusses what the filetype is: https://www.terraform.io/
Please point me to a page that describes this file format.
Can you please paste your .ackrc in here?
# terraform
--type-add=tf=.tf,.tfvars
Please point me to a page that describes this file format.
.tf: https://developer.hashicorp.com/terraform/language/files.tfvars: https://developer.hashicorp.com/terraform/language/values/variables
Is there a different between the .tf and .tfvars? Why are they combined in one fileytype?
I'm thinking it might make more sense to be --terraform than --tf, for clarity, if not brevity.
Let me make an analogy with shell: .tf. is like .sh, where you put in the bulk of your terraform config.
.tfvars is like .env or .envrc where you set / populate variables (environment variables in case of shell).
--terraform is more verbose but it's indeed unambiguous, that would be fine too
So .tf and .tfvars are the same format, but the extension you choose is based on its usage and convention?
I chose tf initially merely because it's shorter.
In hindsight, --terraform is better as it can unambiguously refer to both formats.
Again, if I were to make an analogy with shell, --shell encompasses .bash, .zsh, .sh, etc. Whereas --sh is short to type but it's not apparently obvious whether it refers to only .sh or "any shell extension".
So let's go with your suggestion :P
--type-add=terraform=.tf,.tfvars
Done, thanks, 9fd9834