mirror of
https://github.com/dense-analysis/ale
synced 2024-12-25 23:52:22 +00:00
88fa0b9294
This linter uses the check functionality built into terraform. ALE already has a fixer using `terraform fmt` but this doesn't provide error messages. ALE already has a linter using `tflint` but this requires an extra application to be installed. For example this linter will give a warning that ! is an illegal character in the line below: variable "example" !{} This linter runs the buffer through the command below and parses the output: terraform fmt -no-color -check=true - This commit includes a basic implementation, documentation and tests. The only option is to control which executable is run. Tested with: $ terraform -version Terraform v0.11.13
60 lines
2.2 KiB
Plaintext
60 lines
2.2 KiB
Plaintext
===============================================================================
|
|
ALE Terraform Integration *ale-terraform-options*
|
|
|
|
|
|
===============================================================================
|
|
terraform-fmt-fixer *ale-terraform-fmt-fixer*
|
|
|
|
g:ale_terraform_fmt_executable *g:ale_terraform_fmt_executable*
|
|
*b:ale_terraform_fmt_executable*
|
|
|
|
Type: |String|
|
|
Default: `'terraform'`
|
|
|
|
This variable can be changed to use a different executable for terraform.
|
|
|
|
|
|
g:ale_terraform_fmt_options *g:ale_terraform_fmt_options*
|
|
*b:ale_terraform_fmt_options*
|
|
Type: |String|
|
|
Default: `''`
|
|
|
|
|
|
===============================================================================
|
|
terraform *ale-terraform-terraform*
|
|
|
|
g:ale_terraform_terraform_executable *g:ale_terraform_terraform_executable*
|
|
*b:ale_terraform_terraform_executable*
|
|
|
|
Type: |String|
|
|
Default: `'terraform'`
|
|
|
|
This variable can be changed to use a different executable for terraform.
|
|
|
|
|
|
===============================================================================
|
|
tflint *ale-terraform-tflint*
|
|
|
|
g:ale_terraform_tflint_executable *g:ale_terraform_tflint_executable*
|
|
*b:ale_terraform_tflint_executable*
|
|
|
|
Type: |String|
|
|
Default: `'tflint'`
|
|
|
|
This variable can be changed to use a different executable for tflint.
|
|
|
|
|
|
g:ale_terraform_tflint_options *g:ale_terraform_tflint_options*
|
|
*b:ale_terraform_tflint_options*
|
|
Type: |String|
|
|
Default: `'-f json'`
|
|
|
|
This variable can be changed to pass different options to tflint. Ale does
|
|
expect json output from tflint, so if you change this, you'll probably want
|
|
to include '-f json' in your new value.
|
|
|
|
|
|
===============================================================================
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
|
|