-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
45 lines (44 loc) · 1.2 KB
/
.pre-commit-config.yaml
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
exclude: "^docs/|^vendor|^.vscode"
default_stages: [commit, manual]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: trailing-whitespace
- id: check-yaml
- id: check-json
- id: check-toml
- id: mixed-line-ending
- id: detect-private-key
- repo: https://github.com/domodwyer/pre-commit
rev: v3.5.0
hooks:
- id: branch-name-check
stages: [push]
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt
- id: go-vet-mod
- id: go-staticcheck-repo-mod
- id: go-imports
- repo: local
hooks:
- id: golangci-lint
name: golangci-lint
description: Fast linters runner for Go.
entry: golangci-lint run --new-from-rev origin/main
types: [go]
language: golang
require_serial: true
pass_filenames: false
- repo: local
hooks:
- id: Conventional Commits check
name: commit message should have type prefix
language: pygrep
entry: '^(feat|fix|docs|style|refactor|perf|test|chore|ci)((?:\([^\)]*\))|)!?:(?:\s*)'
args: [--multiline, --negate]
stages: [commit-msg]