-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (45 loc) · 1.33 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
49 lines (45 loc) · 1.33 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
repos:
# Commit message linting
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.6.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
args: [--maxkb=1024]
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
- id: detect-private-key
# Go checks (mirroring GA workflows)
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-mod-tidy
- id: go-unit-tests
args: [-race, -coverprofile=coverage.out, -covermode=atomic]
# Go linting (mirroring GA workflows)
- repo: https://github.com/golangci/golangci-lint
rev: v1.62.2
hooks:
- id: golangci-lint
args: [--config=.golangci.yml]
# Security scanning (mirroring GA workflows)
- repo: local
hooks:
- id: gosec
name: gosec security scanner
entry: bash -c 'gosec -exclude=G104,G107,G204,G301,G304,G306 ./...'
language: system
pass_filenames: false
files: \.go$