Skip to content

Commit 355f7da

Browse files
DevOpsDevOps
authored andcommitted
feat: sync-precommit
1 parent 2243838 commit 355f7da

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.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:

0 commit comments

Comments
 (0)