Skip to content

Contributing

Requirements: Go 1.26+

Terminal window
git clone https://github.com/larsartmann/go-atomic-write.git
cd go-atomic-write
go mod download
Terminal window
go build ./...
Terminal window
# Run all tests
go test ./...
# With race detector
go test -race ./...

Uses golangci-lint with ~100 linters at their strictest defaults. Configuration lives in .golangci.yml.

Terminal window
# Run all configured linters — MUST exit with 0 issues before merging
golangci-lint run ./...
# Auto-fix formatting/imports
golangci-lint run ./... --fix

All pull requests must pass:

  • go build ./... — compiles cleanly
  • go test -race ./... — tests pass with race detection
  • go vet ./... — no vet warnings
  • golangci-lint run ./... — no lint issues
  • Standard testing package — no testify or other test utilities
  • t.Parallel() on most tests
  • t.TempDir() for filesystem isolation
  • Early returns over nested conditionals
  • Strong types over runtime checks
  • Single-letter variables trigger varnamelen — use full words
  • Inline if err triggers noinlineerr — assign first, then check

Adding a new third-party import requires updating the depguard.rules.main.allow list in .golangci.yml.

  • Ensure all tests pass: go test -race ./...
  • Ensure linting passes: golangci-lint run ./...
  • Add tests for new functionality
  • Keep changes focused and atomic

Releases are cut by maintainers: lint gate (0 issues), CI green on master before tagging (test+race, lint, windows/darwin cross-compile, govulncheck, drift guard), [Unreleased] moved into a dated [X.Y.Z] CHANGELOG section inside the tag commit, annotated tag, GitHub release marked latest, then end-to-end verification on the module proxy and pkg.go.dev. Tags are never re-tagged or deleted — the module proxy caches poisoned versions forever.

The website deploys automatically on every push to master that touches website/**, CHANGELOG.md, or README.md. The full checklists live in the repo’s CONTRIBUTING.md and AGENTS.md.