Further parallelize coverage.

Start loading coverage profile files before test execution completed. This
permits to improve the case when there's a lot of packages but one takes much
more time.
1 file changed
tree: 91737ef0b0b538ba27be5936e6975abec3e76617
  1. checks/
  2. cmd/
  3. internal/
  4. samples/
  5. scm/
  6. .gitignore
  7. .travis.yml
  8. CI_SETUP.md
  9. CONFIGURATION.md
  10. DESIGN.md
  11. LICENSE
  12. main.go
  13. main_go14.go
  14. main_test.go
  15. pre-commit-go.yml
  16. README.md
  17. TUTORIAL.md
README.md

pre-commit-go

pre-commit-go runs checks on a Go project on commit and on push via git hooks.

Usage

Setup

go get github.com/maruel/pre-commit-go

Use built-in help to list all options and commands:

pre-commit-go help

Run from within a git checkout inside $GOPATH. This installs the git hooks within .git/hooks and runs the checks in mode pre-push. It runs the checks on the diff against @{upstream}:

pre-commit-go

Bypassing hook

It may become necessary to commit something known to be broken. To bypass the pre-commit hook, use:

git commit --no-verify  (or -n)
git push --no-verify    (-n does something else! <3 git)

Configuration

See Configuration for more details if you want to tweak the default checks. The default checks are meant to be sensible, you can list them with:

pre-commit-go info

Continous integration support

pre-commit-go is designed to be used as part of CI. This is described in its own page.

  • Travis: Build Status
  • CircleCI: Build Status
  • Drone: Build Status
  • Coveralls: Coverage Status