Skip to content

Commit ebfdf7c

Browse files
authored
Merge pull request #27 from BerryBytes/feat/sync-precommit
Feat/sync precommit
2 parents 2243838 + e5818dc commit ebfdf7c

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/sync-precommit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Sync Precommit Config
33
on:
44
push:
55
branches:
6-
- feat/sync
6+
- feat/sync-precommit
77
workflow_dispatch:
88

99
permissions:

global/pre-commit.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ setup_pre_commit_config() {
6868
if [[ ! -f "$file" ]]; then
6969
cat > "$file" <<'EOF'
7070
repos:
71+
# ✅ Precommit hooks
7172
- repo: https://github.com/pre-commit/pre-commit-hooks
7273
rev: v4.4.0
7374
hooks:
@@ -80,6 +81,7 @@ repos:
8081
- id: destroyed-symlinks
8182
- id: pretty-format-json
8283
84+
# ✅ golang fmt and go tidey
8385
- repo: https://github.com/TekWizely/pre-commit-golang
8486
rev: v1.0.0-rc.1
8587
hooks:
@@ -120,13 +122,14 @@ repos:
120122
additional_dependencies:
121123
- pylint-django
122124
- pylint-flask
123-
125+
# ✅ Terraform docs
124126
- repo: https://github.com/terraform-docs/terraform-docs
125127
rev: "v0.16.0"
126128
hooks:
127129
- id: terraform-docs-go
128-
args: ["markdown", "table", "--output-file", "README.md", "./"]
130+
args: ["markdown", "table", "--output-file", "README.md", "./"]
129131
132+
# ✅ Terraform precommit
130133
- repo: https://github.com/antonbabenko/pre-commit-terraform
131134
rev: "v1.74.1"
132135
hooks:
@@ -135,6 +138,7 @@ repos:
135138
- id: terraform_tflint
136139
- id: terraform_tfsec
137140
141+
# ✅ Stylelint
138142
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
139143
rev: v15.10.3
140144
hooks:
@@ -146,13 +150,14 @@ repos:
146150
- stylelint-config-standard
147151
args: ['--config', '.stylelintrc.json', '--fix']
148152
153+
# ✅ Codespell
149154
- repo: https://github.com/codespell-project/codespell
150155
rev: v2.2.5
151156
hooks:
152157
- id: codespell
153158
files: ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
154159
args: ["--ignore-words-list", "hist,nd"]
155-
160+
# ✅ Gitleaks
156161
- repo: https://github.com/gitleaks/gitleaks
157162
rev: v8.21.0
158163
hooks:

global/precommitFile/.pre-commit-config.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
repos:
2+
# ✅ Precommit hooks
23
- repo: https://github.com/pre-commit/pre-commit-hooks
34
rev: v4.4.0
45
hooks:
@@ -11,6 +12,7 @@ repos:
1112
- id: destroyed-symlinks
1213
- id: pretty-format-json
1314

15+
# ✅ golang fmt and go tidey
1416
- repo: https://github.com/TekWizely/pre-commit-golang
1517
rev: v1.0.0-rc.1
1618
hooks:
@@ -51,13 +53,14 @@ repos:
5153
additional_dependencies:
5254
- pylint-django
5355
- pylint-flask
54-
56+
# ✅ Terraform docs
5557
- repo: https://github.com/terraform-docs/terraform-docs
5658
rev: "v0.16.0"
5759
hooks:
5860
- id: terraform-docs-go
59-
args: ["markdown", "table", "--output-file", "README.md", "./"]
61+
args: ["markdown", "table", "--output-file", "README.md", "./"]
6062

63+
# ✅ Terraform precommit
6164
- repo: https://github.com/antonbabenko/pre-commit-terraform
6265
rev: "v1.74.1"
6366
hooks:
@@ -66,6 +69,7 @@ repos:
6669
- id: terraform_tflint
6770
- id: terraform_tfsec
6871

72+
# ✅ Stylelint
6973
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
7074
rev: v15.10.3
7175
hooks:
@@ -77,13 +81,14 @@ repos:
7781
- stylelint-config-standard
7882
args: ['--config', '.stylelintrc.json', '--fix']
7983

84+
# ✅ Codespell
8085
- repo: https://github.com/codespell-project/codespell
8186
rev: v2.2.5
8287
hooks:
8388
- id: codespell
8489
files: ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
8590
args: ["--ignore-words-list", "hist,nd"]
86-
91+
# ✅ Gitleaks
8792
- repo: https://github.com/gitleaks/gitleaks
8893
rev: v8.21.0
8994
hooks:

0 commit comments

Comments
 (0)