24 lines
517 B
TOML
24 lines
517 B
TOML
|
[hooks]
|
||
|
|
||
|
pre-commit = [
|
||
|
"golangci-lint run --fast --fix",
|
||
|
"husky lint-staged",
|
||
|
]
|
||
|
|
||
|
commit-msg = [
|
||
|
"husky lint-commit",
|
||
|
]
|
||
|
|
||
|
[lint-staged]
|
||
|
"*.go" = [
|
||
|
"goimports -l -w",
|
||
|
"gofmt -l -w",
|
||
|
]
|
||
|
|
||
|
[lint-commit]
|
||
|
# could check if this exists
|
||
|
# email = "^(.+@gmail.com|.+@qq.com)$"
|
||
|
# optional custom types check regex
|
||
|
types = "^(feat|fix|build|chore|ci|docs|perf|refactor|revert|style|test)$"
|
||
|
# optional header check regex
|
||
|
header = "^(?P<type>\\w+)(\\((?P<scope>[\\w/.-]+)\\))?(?P<breaking>!)?:( +)?(?P<header>.+)"
|