Skip to content

Commit 27539aa

Browse files
committed
feat: upgrade config
1 parent 3e573f3 commit 27539aa

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ----------------------------------------------------------------------
2-
# Pre‑commit Configuration for go-subtree
2+
# Pre‑commit Configuration for the local repository
33
#
44
# Purpose: Enforce code quality, security, and COMMENTING RULES defined
55
# in .github/AGENTS.md before any commit reaches the repository.
@@ -17,29 +17,30 @@ minimum_pre_commit_version: "3.7.0" # requires Python‑based hooks v2.0+
1717
repos:
1818
# ---------------------- Core hygiene hooks --------------------------
1919
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v4.6.0
20+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
2121
hooks:
2222
- id: check-added-large-files
2323
- id: end-of-file-fixer
2424
- id: trailing-whitespace
2525
- id: check-merge-conflict
2626

2727
# ------------------------- Go toolchain -----------------------------
28-
- repo: https://github.com/dnephin/pre-commit-golang
29-
rev: v1.5.2
28+
- repo: https://github.com/TekWizely/pre-commit-golang
29+
rev: 302c7fd28cdbb62d5fd1e3965fe36e33a5f77803 # frozen: v1.0.0-rc.1
3030
hooks:
3131
- id: go-fmt
32-
- id: go-imports
3332
- id: go-vet
33+
- id: go-lint
34+
- id: go-imports
3435
- id: golangci-lint
35-
args: [ "--config=.golangci.json --verbose" ]
36+
- id: go-mod-tidy
3637

3738
# ------------------------ Security scans ---------------------------
3839
- repo: https://github.com/zricethezav/gitleaks
39-
rev: v8.18.2
40+
rev: 47218a628da59ef6b24197d15f4b0248ca87f4f0 # frozen: v8.27.2
4041
hooks:
4142
- id: gitleaks
42-
stages: [ commit, push ]
43+
stages: [ pre-commit, pre-push ]
4344

4445
# ------------------- Commenting rule enforcement -------------------
4546
- repo: local
@@ -63,14 +64,11 @@ repos:
6364
- ruamel.yaml==0.18
6465

6566
# --------------------- Commit‑msg validation -----------------------
66-
- repo: https://github.com/antham/commitlint
67-
rev: v0.7.0
67+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
68+
rev: 879f5400493f84c8b683bdeb3366a8439ca17858 # frozen: v9.22.0
6869
hooks:
6970
- id: commitlint
7071
stages: [ commit-msg ]
71-
entry: commitlint -g .github/commitlint.config.js
72-
additional_dependencies:
73-
- "@commitlint/config-conventional@19.3.0"
74-
- "@commitlint/cli@19.3.0"
72+
additional_dependencies: [ '@commitlint/config-conventional' ]
7573

76-
default_stages: [ commit, push ]
74+
default_stages: [ pre-commit, pre-push ]

0 commit comments

Comments
 (0)