husky

module
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2021 License: MIT

README

Husky

GoDoc Widget codecov Go Report Card

Husky.js like, but pure in golang

Usage

install

go get -u github.com/go-courier/husky/cmd/husky

Configuration .husky.yaml

hooks:
  # hook scripts
  pre-commit:
    - golangci-lint run
    - husky lint-staged
  commit-msg:
    - husky lint-commit
  
# list staged files do some pre-process and git add
lint-staged:
  "*.go":
    - gofmt -l -w

# commit msg rule only support conventionalcommits
lint-commit:
  # could check if this exists
  # regexp
  email: "^(.+@gmail.com|.+@qq.com)$"

Commit msg rule follow https://www.conventionalcommits.org/en/v1.0.0/

type(scope?): header

body?

footer?

Directories

Path Synopsis
cmd
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL