Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishnama committed Apr 15, 2024
1 parent bb4a78e commit 2cbbb0d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
37 changes: 21 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,43 @@ repos:
rev: v1.88.4
hooks:
- id: terraform_fmt
name: running terraform fmt
description: Checks if the terraform code format is valid.
stages: [commit]
- id: terraform_docs
name: Running Terraform Docs
description: Generates terraform documentation.(Readme File)
args:
- '--args=--lockfile=false'
- '--args=--config=.terraform-docs.yml'
- id: terraform_tflint
name: terraform tflint
description: Automatic terraform linting.
args:
- --args=--config=.tflint.hcl
# - '--args=--only=terraform_deprecated_index'
# - '--args=--only=terraform_deprecated_interpolation'
# - '--args=--only=terraform_deprecated_index'
# - '--args=--only=terraform_unused_declarations'
# - '--args=--only=terraform_comment_syntax'
# - '--args=--only=terraform_documented_outputs'
# - '--args=--only=terraform_documented_variables'
# - '--args=--only=terraform_typed_variables'
# - '--args=--only=terraform_module_pinned_source'
# - '--args=--only=terraform_naming_convention'
# - '--args=--only=terraform_required_version'
# - '--args=--only=terraform_required_providers'
# - '--args=--only=terraform_standard_module_structure'
# - '--args=--only=terraform_workspace_remote'
# - '--args=--only=terraform_unused_required_providers'
- config=.tflint.hcl
exclude: examples
- id: terraform_validate
name: terraform validate
description: Terraform code validator.
exclude: examples
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
name: check merge conflict
description: Check for files that contain merge conflict strings.
- id: end-of-file-fixer
name: end of file fixer
description: Let's be sure that a new line has been added to the end of the file.
- id: trailing-whitespace
name: trailing whitespace
description: Automatically remove trailing whitespace before committing.
- id: detect-private-key
name: detect-private-key
description: Detect if any Private key was defined
- id: detect-aws-credentials
name: detect-aws-credentials
description: find if any aws credentials are defined in module
args: [--allow-missing-credentials]
- id: check-yaml
name: check yaml
Expand Down
3 changes: 1 addition & 2 deletions .tflint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

plugin "aws" {
enabled = true
version = "0.21.1"
version = "0.30.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
config {
module = true
force = false
call_module_type = none
}

rule "terraform_required_providers" {
Expand Down

0 comments on commit 2cbbb0d

Please sign in to comment.