From 88fa0b9294c6e907e8e2e8bee2ca593dff91b473 Mon Sep 17 00:00:00 2001 From: Keith Maxwell Date: Thu, 23 May 2019 14:12:36 +0100 Subject: Add a terraform linter 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 --- doc/ale-terraform.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc/ale-terraform.txt') diff --git a/doc/ale-terraform.txt b/doc/ale-terraform.txt index 49a55028..387fd732 100644 --- a/doc/ale-terraform.txt +++ b/doc/ale-terraform.txt @@ -3,7 +3,7 @@ ALE Terraform Integration *ale-terraform-options* =============================================================================== -fmt *ale-terraform-fmt* +terraform-fmt-fixer *ale-terraform-fmt-fixer* g:ale_terraform_fmt_executable *g:ale_terraform_fmt_executable* *b:ale_terraform_fmt_executable* @@ -20,6 +20,18 @@ g:ale_terraform_fmt_options *g:ale_terraform_fmt_options* 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* -- cgit v1.2.3