Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
#
# https://direnv.net/
#

pre-commit install

source_env_if_exists .envrc.private
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
**/.CFUserTextEncoding
**/.Trash/
**/$RECYCLE.BIN/

## direnv
/.envrc.private
/.direnv/
28 changes: 25 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
repos:
# Pre-commit
# Pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 # Get the latest from https://github.com/pre-commit/pre-commit-hooks/releases
rev: v4.5.0 # See the release notes at https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- 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: check-merge-conflict
name: check merge conflict
description: Check for files that contain merge conflict strings.
stages: [commit]
- id: check-executables-have-shebangs
name: check executables have shebangs
description: Checks that non-binary executables have a proper shebang.
stages: [commit]
- id: detect-private-key
name: detect private key
description: Checks for the existence of private keys.
stages: [commit]
- id: check-symlinks
name: check symlinks
description: Checks for symlinks which do not point to anything.
stages: [commit]
- id: mixed-line-ending
name: mixed line ending
description: Replaces or checks mixed line ending.
stages: [commit]
- id: check-yaml
name: check yaml
Expand All @@ -24,17 +38,25 @@ repos:

# Terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.75.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
rev: v1.88.0 # See the release notes at https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
name: terraform fmt
description: Checks if the terraform code format is valid.
stages: [commit]
- id: terraform_tflint
name: terraform tflint
description: Automatic terraform linting.
stages: [commit]
exclude: (examples)
- id: terraform_validate
name: terraform validate
description: Terraform code validator.
stages: [commit]
exclude: (examples)
- id: terraform_docs
name: terraform docs
description: Generates terraform documentation.
args:
- --args=--config=.terraform-docs.yml
stages: [commit]
6 changes: 5 additions & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
formatter: markdown table

version: ">= 0.16.0, < 1.0.0"
version: ">= 0.17.0, < 1.0.0"

output:
file: README.md
mode: inject
template: |-
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->

sort:
enabled: true
Expand Down
23 changes: 23 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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"
}
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
terraform 1.3.1
terraform-docs 0.16.0
tflint 0.41.0
pre-commit 2.20.0
terraform 1.5.7
terraform-docs 0.17.0
tflint 0.50.3
pre-commit 3.6.2
148 changes: 0 additions & 148 deletions CONTRIBUTING.md

This file was deleted.

Loading