-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
33 lines (32 loc) · 939 Bytes
/
.pre-commit-config.yaml
File metadata and controls
33 lines (32 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
repos:
# Go formatting and imports
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
# Format Go code with gofmt
- id: go-fmt
# Organize Go imports
- id: go-imports
# Run go mod tidy
- id: go-mod-tidy
# Run go vet
- id: go-vet-mod
# Build the project to catch compilation errors
- id: go-build-mod
# General hooks for all files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Remove trailing whitespace
- id: trailing-whitespace
# Ensure files end with newline
- id: end-of-file-fixer
# Check YAML files are valid
- id: check-yaml
# Check JSON files are valid
- id: check-json
# Check for merge conflict markers
- id: check-merge-conflict
# Prevent committing large files
- id: check-added-large-files
args: ['--maxkb=1000']