Skip to content

Commit b47a289

Browse files
committed
fix: enabled pre-commit
1 parent 0018db3 commit b47a289

14 files changed

+1006
-1104
lines changed

.github/settings.yaml

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
1-
_extends: .github
2-
3-
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
4-
repository:
5-
# See https://developer.github.com/v3/repos/#edit for all available settings.
6-
7-
# The name of the repository. Changing this will rename the repository
8-
# name: repo-name
9-
10-
# A short description of the repository that will show up on GitHub
11-
# description: This is a a repository template, and the dscription and homepage can be changed in .github/settings.yml
12-
13-
# A URL with more information about the repository
14-
# homepage: https://example.github.io/
15-
16-
# A comma-separated list of topics to set on the repository
17-
# topics: templates, github
18-
19-
# Either `true` to enable issues for this repository, `false` to disable them.
20-
has_issues: true
21-
22-
# Either `true` to enable projects for this repository, or `false` to disable them.
23-
# If projects are disabled for the organization, passing `true` will cause an API error.
24-
has_projects: true
25-
26-
# Either `true` to enable the wiki for this repository, `false` to disable it.
27-
has_wiki: false
28-
29-
# Either `true` to enable downloads for this repository, `false` to disable them.
30-
has_downloads: true
31-
32-
# Updates the default branch for this repository.
33-
default_branch: master
34-
35-
# Either `true` to allow squash-merging pull requests, or `false` to prevent
36-
# squash-merging.
37-
allow_squash_merge: true
38-
39-
# Either `true` to allow merging pull requests with a merge commit, or `false`
40-
# to prevent merging pull requests with merge commits.
41-
allow_merge_commit: true
42-
43-
# Either `true` to allow rebase-merging pull requests, or `false` to prevent
44-
# rebase-merging.
45-
allow_rebase_merge: true
46-
47-
# Collaborators: give specific users access to this repository.
48-
# collaborators:
49-
# - username: username
50-
# Note: Only valid on organization-owned repositories.
51-
# The permission to grant the collaborator. Can be one of:
52-
# * `pull` - can pull, but not push to or administer this repository.
53-
# * `push` - can pull and push, but not administer this repository.
54-
# * `admin` - can pull, push and administer this repository.
55-
# permission: push
56-
57-
# teams:
58-
# - name: core
59-
# permission: admin
60-
# - name: docs
61-
# permission: push
62-
63-
branches:
64-
- name: master
65-
protection:
66-
required_pull_request_reviews:
67-
required_approving_review_count: 1
68-
dismiss_stale_reviews: true
69-
require_code_owner_reviews: true
70-
dismissal_restrictions:
71-
users: []
72-
teams: []
73-
required_status_checks:
74-
strict: true
75-
contexts: []
76-
enforce_admins: true
77-
restrictions:
78-
apps: []
79-
users: []
80-
teams: []
1+
_extends: .github
2+
3+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
4+
repository:
5+
# See https://developer.github.com/v3/repos/#edit for all available settings.
6+
7+
# The name of the repository. Changing this will rename the repository
8+
# name: repo-name
9+
10+
# A short description of the repository that will show up on GitHub
11+
# description: This is a a repository template, and the dscription and homepage can be changed in .github/settings.yml
12+
13+
# A URL with more information about the repository
14+
# homepage: https://example.github.io/
15+
16+
# A comma-separated list of topics to set on the repository
17+
# topics: templates, github
18+
19+
# Either `true` to enable issues for this repository, `false` to disable them.
20+
has_issues: true
21+
22+
# Either `true` to enable projects for this repository, or `false` to disable them.
23+
# If projects are disabled for the organization, passing `true` will cause an API error.
24+
has_projects: true
25+
26+
# Either `true` to enable the wiki for this repository, `false` to disable it.
27+
has_wiki: false
28+
29+
# Either `true` to enable downloads for this repository, `false` to disable them.
30+
has_downloads: true
31+
32+
# Updates the default branch for this repository.
33+
default_branch: master
34+
35+
# Either `true` to allow squash-merging pull requests, or `false` to prevent
36+
# squash-merging.
37+
allow_squash_merge: true
38+
39+
# Either `true` to allow merging pull requests with a merge commit, or `false`
40+
# to prevent merging pull requests with merge commits.
41+
allow_merge_commit: true
42+
43+
# Either `true` to allow rebase-merging pull requests, or `false` to prevent
44+
# rebase-merging.
45+
allow_rebase_merge: true
46+
47+
# Collaborators: give specific users access to this repository.
48+
# collaborators:
49+
# - username: username
50+
# Note: Only valid on organization-owned repositories.
51+
# The permission to grant the collaborator. Can be one of:
52+
# * `pull` - can pull, but not push to or administer this repository.
53+
# * `push` - can pull and push, but not administer this repository.
54+
# * `admin` - can pull, push and administer this repository.
55+
# permission: push
56+
57+
# teams:
58+
# - name: core
59+
# permission: admin
60+
# - name: docs
61+
# permission: push
62+
63+
branches:
64+
- name: master
65+
protection:
66+
required_pull_request_reviews:
67+
required_approving_review_count: 1
68+
dismiss_stale_reviews: true
69+
require_code_owner_reviews: true
70+
dismissal_restrictions:
71+
users: []
72+
teams: []
73+
required_status_checks:
74+
strict: true
75+
contexts: []
76+
enforce_admins: true
77+
restrictions:
78+
apps: []
79+
users: []
80+
teams: []

.github/workflows/lint.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
name: Linting
2-
3-
on:
4-
push:
5-
branches:
6-
- master
7-
paths:
8-
- '**.tf'
9-
10-
pull_request:
11-
paths:
12-
- '**.tf'
13-
14-
jobs:
15-
terraform:
16-
name: Terraform format and validate
17-
runs-on: ubuntu-latest
18-
19-
steps:
20-
- uses: actions/checkout@v2
21-
22-
- name: Setup Terraform
23-
uses: hashicorp/setup-terraform@v1
24-
25-
- name: terraform fmt
26-
run: terraform fmt -check -recursive -diff
27-
28-
- name: 'module: terraform init'
29-
run: terraform init
30-
31-
- name: 'samples: terraform validate'
32-
env:
33-
AWS_DEFAULT_REGION: eu-central-1
34-
run: |
35-
for sample in $(find samples -maxdepth 1 -mindepth 1 -type d); do
36-
cd $sample
37-
terraform init
38-
terraform validate
39-
cd -
40-
done
41-
42-
docs:
43-
name: Docs
44-
runs-on: macOS-latest
45-
46-
steps:
47-
- uses: actions/checkout@v2
48-
49-
- name: Install deps
50-
run: brew update && brew install pre-commit terraform-docs terraform
51-
52-
- name: Verify docs up-to-date
53-
run: pre-commit run --show-diff-on-failure --all-files terraform_docs
54-
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- '**.tf'
9+
10+
pull_request:
11+
paths:
12+
- '**.tf'
13+
14+
jobs:
15+
terraform:
16+
name: Terraform format and validate
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup Terraform
23+
uses: hashicorp/setup-terraform@v1
24+
25+
- name: terraform fmt
26+
run: terraform fmt -check -recursive -diff
27+
28+
- name: 'module: terraform init'
29+
run: terraform init
30+
31+
- name: 'samples: terraform validate'
32+
env:
33+
AWS_DEFAULT_REGION: eu-central-1
34+
run: |
35+
for sample in $(find samples -maxdepth 1 -mindepth 1 -type d); do
36+
cd $sample
37+
terraform init
38+
terraform validate
39+
cd -
40+
done
41+
42+
docs:
43+
name: Docs
44+
runs-on: macOS-latest
45+
46+
steps:
47+
- uses: actions/checkout@v2
48+
49+
- name: Install deps
50+
run: brew update && brew install pre-commit terraform-docs terraform
51+
52+
- name: Verify docs up-to-date
53+
run: pre-commit run --show-diff-on-failure --all-files terraform_docs
54+

.gitignore

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Local .terraform directories
2-
**/.terraform/*
3-
4-
# .tfstate files
5-
*.tfstate
6-
*.tfstate.*
7-
8-
# Crash log files
9-
crash.log
10-
11-
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
12-
# .tfvars files are managed as part of configuration and so should be included in
13-
# version control.
14-
#
15-
# example.tfvars
16-
17-
# Ignore override files as they are usually used to override resources locally and so
18-
# are not checked in
19-
override.tf
20-
override.tf.json
21-
*_override.tf
22-
*_override.tf.json
23-
24-
*.swp
25-
26-
.generated_manifests/
27-
kubeconfig_*
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# Crash log files
9+
crash.log
10+
11+
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
12+
# .tfvars files are managed as part of configuration and so should be included in
13+
# version control.
14+
#
15+
# example.tfvars
16+
17+
# Ignore override files as they are usually used to override resources locally and so
18+
# are not checked in
19+
override.tf
20+
override.tf.json
21+
*_override.tf
22+
*_override.tf.json
23+
24+
*.swp
25+
26+
.generated_manifests/
27+
kubeconfig_*

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
repos:
2-
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.30.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
4-
hooks:
5-
- id: terraform_fmt
6-
- id: terraform_docs
1+
repos:
2+
- repo: git://github.com/antonbabenko/pre-commit-terraform
3+
rev: v1.30.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
4+
hooks:
5+
- id: terraform_fmt
6+
- id: terraform_docs

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.PHONY: check-docs check-fmt check-all docs
2-
3-
check-all: check-docs check-fmt
4-
5-
check-docs:
6-
pre-commit run --show-diff-on-failure --all-files terraform_docs
7-
8-
check-fmt:
9-
pre-commit run --all-files terraform_fmt
1+
.PHONY: check-docs check-fmt check-all docs
2+
3+
check-all: check-docs check-fmt
4+
5+
check-docs:
6+
pre-commit run --show-diff-on-failure --all-files terraform_docs
7+
8+
check-fmt:
9+
pre-commit run --all-files terraform_fmt

0 commit comments

Comments
 (0)