Skip to content

Commit 07cd724

Browse files
committed
chore: set up configs for editor, pre-commit, tfdocs, and linting
1 parent 037227d commit 07cd724

File tree

6 files changed

+115
-0
lines changed

6 files changed

+115
-0
lines changed

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
# Uses editorconfig to maintain consistent coding styles
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = space
13+
insert_final_newline = true
14+
max_line_length = 80
15+
trim_trailing_whitespace = true
16+
17+
[*.{tf,tfvars}]
18+
indent_size = 2
19+
indent_style = space
20+
21+
[*.md]
22+
max_line_length = 0
23+
trim_trailing_whitespace = false
24+
25+
[Makefile]
26+
tab_width = 2
27+
indent_style = tab
28+
29+
[COMMIT_EDITMSG]
30+
max_line_length = 0

.header.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Main

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
repos:
2+
- repo: https://github.com/antonbabenko/pre-commit-terraform
3+
rev: v1.77.0
4+
hooks:
5+
- id: terraform_fmt
6+
- id: terraform_validate
7+
- id: terraform_tflint
8+
args:
9+
- '--args=--only=terraform_deprecated_interpolation'
10+
- '--args=--only=terraform_deprecated_index'
11+
- '--args=--only=terraform_unused_declarations'
12+
- '--args=--only=terraform_comment_syntax'
13+
- '--args=--only=terraform_documented_outputs'
14+
- '--args=--only=terraform_documented_variables'
15+
- '--args=--only=terraform_typed_variables'
16+
- '--args=--only=terraform_module_pinned_source'
17+
- '--args=--only=terraform_naming_convention'
18+
- '--args=--only=terraform_standard_module_structure'
19+
- '--args=--only=terraform_workspace_remote'
20+
- repo: https://github.com/pre-commit/pre-commit-hooks
21+
rev: v4.4.0
22+
hooks:
23+
- id: check-merge-conflict
24+
- id: end-of-file-fixer
25+
- id: trailing-whitespace

.releaserc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"debug": false,
6+
"ci": true,
7+
"dryRun": false,
8+
"plugins": [
9+
"@semantic-release/commit-analyzer",
10+
"@semantic-release/release-notes-generator",
11+
"@semantic-release/github"
12+
]
13+
}

.terraform-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
formatter: "markdown table"
2+
3+
version: ""
4+
5+
header-from: .header.md
6+
footer-from: ""
7+
8+
recursive:
9+
enabled: true
10+
path: modules
11+
include-main: true
12+
13+
output:
14+
file: "README.md"
15+
mode: replace
16+
template: |-
17+
{{ .Content }}
18+
19+
sort:
20+
enabled: true
21+
by: name
22+
23+
settings:
24+
anchor: true
25+
color: true
26+
default: true
27+
description: false
28+
escape: true
29+
hide-empty: false
30+
html: true
31+
indent: 2
32+
lockfile: true
33+
read-comments: true
34+
required: true
35+
sensitive: true
36+
type: true

.tflint.hcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugin "terraform" {
2+
enabled = true
3+
preset = "recommended"
4+
}
5+
6+
plugin "aws" {
7+
enabled = true
8+
version = "0.32.0"
9+
source = "github.com/terraform-linters/tflint-ruleset-aws"
10+
}

0 commit comments

Comments
 (0)