Skip to content

Commit

Permalink
update tflint patren
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishnama committed Apr 15, 2024
1 parent 3c5b41e commit 7fdf387
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ repos:
- '--args=--config=.terraform-docs.yml'
- id: terraform_tflint
args:
- '--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'
- --args=--config=__GIT_WORKING_DIR__/.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'
- id: terraform_validate
exclude: examples
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
25 changes: 25 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,28 @@ rule "terraform_standard_module_structure" {
rule "terraform_workspace_remote" {
enabled = true
}


config {
format = "compact"
module = false
force = false
}

# Enable all rules, always. The bundled plugin uses only recommended.
// plugin "terraform" {
// enabled = true
// preset = "all"
// }

// # Enforces module version pinning.
// rule "terraform_module_pinned_source" {
// enabled = true
// style = "semver"
// }

// # Enforces naming conventions.
// rule "terraform_naming_convention" {
// enabled = true
// format = "snake_case"
// }

0 comments on commit 7fdf387

Please sign in to comment.