Skip to content

Commit 57ab8b8

Browse files
committed
Sync pre-commit YAML config from global/precommitFile
1 parent da7c248 commit 57ab8b8

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- id: check-added-large-files
9+
- id: check-vcs-permalinks
10+
- id: check-symlinks
11+
- id: destroyed-symlinks
12+
- id: pretty-format-json
13+
14+
- repo: https://github.com/TekWizely/pre-commit-golang
15+
rev: v1.0.0-rc.1
16+
hooks:
17+
- id: go-fmt
18+
args: [-w]
19+
- id: go-mod-tidy # Ensure go.mod & go.sum are tidy
20+
21+
- repo: https://github.com/psf/black
22+
rev: 23.9.1
23+
hooks:
24+
- id: black
25+
args: [--line-length=88]
26+
# ✅ Import sorter (runs before Black)
27+
- repo: https://github.com/PyCQA/isort
28+
rev: 5.12.0
29+
hooks:
30+
- id: isort
31+
args: ["--profile=black"]
32+
33+
# ✅ Linter (flake8 for code quality)
34+
- repo: https://github.com/pycqa/flake8
35+
rev: 6.1.0
36+
hooks:
37+
- id: flake8
38+
args:
39+
- --max-line-length=88
40+
- --extend-ignore=E203,W503
41+
additional_dependencies:
42+
- flake8-bugbear
43+
- flake8-comprehensions
44+
- flake8-docstrings
45+
# ✅ Static code analysis for Python (pylint optional)
46+
- repo: https://github.com/pycqa/pylint
47+
rev: v3.2.6
48+
hooks:
49+
- id: pylint
50+
args: ["--disable=C0114,C0115,C0116"]
51+
additional_dependencies:
52+
- pylint-django
53+
- pylint-flask
54+
55+
- repo: https://github.com/terraform-docs/terraform-docs
56+
rev: "v0.16.0"
57+
hooks:
58+
- id: terraform-docs-go
59+
args: ["markdown", "table", "--output-file", "README.md", "./"]
60+
61+
- repo: https://github.com/antonbabenko/pre-commit-terraform
62+
rev: "v1.74.1"
63+
hooks:
64+
- id: terraform_fmt
65+
- id: terraform_validate
66+
- id: terraform_tflint
67+
- id: terraform_tfsec
68+
69+
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
70+
rev: v15.10.3
71+
hooks:
72+
- id: stylelint
73+
files: \.(css|scss)$
74+
exclude: "node_modules/"
75+
additional_dependencies:
76+
- stylelint
77+
- stylelint-config-standard
78+
args: ['--config', '.stylelintrc.json', '--fix']
79+
80+
- repo: https://github.com/codespell-project/codespell
81+
rev: v2.2.5
82+
hooks:
83+
- id: codespell
84+
files: ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
85+
args: ["--ignore-words-list", "hist,nd"]
86+
87+
- repo: https://github.com/gitleaks/gitleaks
88+
rev: v8.21.0
89+
hooks:
90+
- id: gitleaks
91+
args: ["detect", "--verbose"]
92+
verbose: true

0 commit comments

Comments
 (0)