11repos :
2- # ######### ✅ Precommit Hooks #########
2+ # ==========================================
3+ # Pre-commit default hooks
4+ # ==========================================
35 - repo : https://github.com/pre-commit/pre-commit-hooks
46 rev : v4.4.0
57 hooks :
@@ -12,55 +14,48 @@ repos:
1214 - id : destroyed-symlinks
1315 - id : pretty-format-json
1416
15- # ######### ✅ golang fmt and go tidey #########
17+ # ==========================================
18+ # Golang hooks
19+ # ==========================================
1620 - repo : https://github.com/TekWizely/pre-commit-golang
1721 rev : v1.0.0-rc.1
1822 hooks :
1923 - id : go-fmt
2024 args : [-w]
21- - id : go-mod-tidy # Ensure go.mod & go.sum are tidy
25+ - id : go-mod-tidy
2226
27+ # ==========================================
28+ # Python formatting & linting
29+ # ==========================================
2330 - repo : https://github.com/psf/black
2431 rev : 23.9.1
2532 hooks :
2633 - id : black
2734 args : [--line-length=88]
28- # ✅ Import sorter (runs before Black)
35+
2936 - repo : https://github.com/PyCQA/isort
3037 rev : 5.12.0
3138 hooks :
3239 - id : isort
3340 args : ["--profile=black"]
3441
35- # ✅ Linter (flake8 for code quality)
3642 - repo : https://github.com/pycqa/flake8
3743 rev : 6.1.0
3844 hooks :
3945 - id : flake8
4046 args :
4147 - --max-line-length=88
4248 - --extend-ignore=E203,W503
43- additional_dependencies :
44- - flake8-bugbear
45- - flake8-comprehensions
46- - flake8-docstrings
47- # ✅ Static code analysis for Python (pylint optional)
48- - repo : https://github.com/pycqa/pylint
49- rev : v3.2.6
50- hooks :
51- - id : pylint
52- args : ["--disable=C0114,C0115,C0116"]
53- additional_dependencies :
54- - pylint-django
55- - pylint-flask
56- # ✅ Terraform docs
49+
50+ # ==========================================
51+ # Terraform hooks
52+ # ==========================================
5753 - repo : https://github.com/terraform-docs/terraform-docs
5854 rev : " v0.16.0"
5955 hooks :
6056 - id : terraform-docs-go
61- args : ["markdown", "table", "--output-file", "README.md", "./"]
57+ args : ["markdown", "table", "--output-file", "README.md", "./"]
6258
63- # ✅ Terraform precommit
6459 - repo : https://github.com/antonbabenko/pre-commit-terraform
6560 rev : " v1.74.1"
6661 hooks :
@@ -69,29 +64,33 @@ repos:
6964 - id : terraform_tflint
7065 - id : terraform_tfsec
7166
72- # ✅ Stylelint
73- - repo : https://github.com/thibaudcolas/pre-commit-stylelint
74- rev : v15.10.3
75- hooks :
76- - id : stylelint
77- files : \.(css|scss)$
78- exclude : " node_modules/"
79- additional_dependencies :
80- - stylelint
81- - stylelint-config-standard
82- args : ['--config', '.stylelintrc.json', '--fix']
83-
84- # ✅ Codespell
67+ # ==========================================
68+ # Codespell
69+ # ==========================================
8570 - repo : https://github.com/codespell-project/codespell
8671 rev : v2.2.5
8772 hooks :
8873 - id : codespell
8974 files : ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
9075 args : ["--ignore-words-list", "hist,nd"]
91- # ✅ Gitleaks
76+
77+ # ==========================================
78+ # Gitleaks
79+ # ==========================================
9280 - repo : https://github.com/gitleaks/gitleaks
9381 rev : v8.21.0
9482 hooks :
9583 - id : gitleaks
9684 args : ["detect", "--verbose"]
97- verbose : true
85+
86+ # ==========================================
87+ # FIXED STYLELINT HOOK (No nodeenv)
88+ # ==========================================
89+ - repo : local
90+ hooks :
91+ - id : stylelint
92+ name : stylelint
93+ entry : npx stylelint --fix
94+ language : system
95+ types : [css, scss]
96+ exclude : " node_modules/|dist/|build/"
0 commit comments