Skip to content

Commit c9d0741

Browse files
Merge pull request #89 from numtide/pre-commit-hooks
ci: add pre-commit hooks to enforce linting and style
2 parents 3558692 + d6a4350 commit c9d0741

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# .pre-commit-config.yaml
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.5.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: check-added-large-files
10+
11+
- repo: local
12+
hooks:
13+
# # 1. Ensure go.mod/go.sum are tidy across all modules
14+
# - id: go-modules-tidy
15+
# name: Go Modules Tidy
16+
# entry: make modules-tidy
17+
# language: system
18+
# files: \.go$
19+
# pass_filenames: false
20+
21+
# 2. Run Linters and Auto-fixers (gofumpt, golines, etc.)
22+
- id: go-lint-fix
23+
name: Go Lint Fix
24+
entry: make lint-fix
25+
language: system
26+
files: \.go$
27+
pass_filenames: false

0 commit comments

Comments
 (0)