Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 528 Bytes

File metadata and controls

40 lines (27 loc) · 528 Bytes

Contributing

Setup

Enable the pre-commit hook:

git config core.hooksPath .githooks

Install golangci-lint:

go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

Pre-commit checks

The pre-commit hook runs automatically on staged .go files:

  1. gofmt -s - Format check
  2. golangci-lint - Linting
  3. go test - Tests
  4. go build - Build verification

Manual checks

# Format
gofmt -s -w .

# Lint
golangci-lint run ./...

# Test
make test

# Build
make