Thanks for wanting to contribute! This file documents the development workflow, local checks, and how to run the project's quality gates locally before opening a PR.
This repository includes a pre-commit hook in .githooks/pre-commit that will:
- run
gofmt -s -won staged.gofiles and re-add them to the index - run the configured linters (prefer
golangci-lintif installed, otherwise falls back togo vet) - run the full test suite (
go test ./...)
To enable the hook locally (one-time):
git config core.hooksPath .githooks
chmod +x .githooks/pre-commitYou can skip the hook for a single commit with git commit --no-verify, but avoid doing that for PRs unless there is a valid reason.
We recommend installing golangci-lint for fast, consistent linting. It runs many linters in parallel and respects the project's .golangci.yml.
macOS (Homebrew):
brew install golangci-lintLinux (bash):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
# ensure $(go env GOPATH)/bin is in your PATHOr see the official instructions: https://golangci-lint.run/usage/install/
Format code:
gofmt -s -w $(git ls-files '*.go')Lint (preferred):
golangci-lint run ./...Fallback lint (if you don't have golangci-lint):
go vet ./...Run tests:
go test ./...- Fork the repo and create a feature branch from
main. - Make changes and ensure pre-commit checks pass locally.
- Open a PR against
mainwith a clear description of the change.
CI will run the linter and tests on your PR. Please address any lint/test failures before merging.
Thanks — contributions are welcome!
Thanks for wanting to contribute! This file documents the development workflow, local checks, and how to run the project's quality gates locally before opening a PR.
This repository includes a pre-commit hook in .githooks/pre-commit that will:
- run
gofmt -s -won staged.gofiles and re-add them to the index - run the configured linters (prefer
golangci-lintif installed, otherwise falls back togo vet) - run the full test suite (
go test ./...)
To enable the hook locally (one-time):
git config core.hooksPath .githooks
chmod +x .githooks/pre-commitYou can skip the hook for a single commit with git commit --no-verify, but avoid doing that for PRs unless there is a valid reason.
We recommend installing golangci-lint for fast, consistent linting. It runs many linters in parallel and respects the project's .golangci.yml.
macOS (Homebrew):
brew install golangci-lintLinux (bash):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
# ensure $(go env GOPATH)/bin is in your PATHOr see the official instructions: https://golangci-lint.run/usage/install/
Format code:
gofmt -s -w $(git ls-files '*.go')Lint (preferred):
golangci-lint run ./...Fallback lint (if you don't have golangci-lint):
go vet ./...Run tests:
go test ./...- Fork the repo and create a feature branch from
main. - Make changes and ensure pre-commit checks pass locally.
- Open a PR against
mainwith a clear description of the change.
CI will run the linter and tests on your PR. Please address any lint/test failures before merging.
Thanks — contributions are welcome!