Thanks for your interest in contributing! Here's how to get started.
git clone https://github.com/ImVivec/stepmark.git
cd stepmark
make check # runs fmt, vet, and testsStepmark is a zero-dependency library. The core package must only use the Go standard library.
- Go 1.23 or later
- (Optional) golangci-lint for
make lint
| Target | What it does |
|---|---|
make test |
Run tests with race detector |
make bench |
Run benchmarks |
make vet |
Run go vet |
make lint |
Run golangci-lint |
make fmt |
Format code |
make cover |
Generate HTML coverage report |
make check |
Format + vet + test (run before submitting) |
make test # all tests with race detector
make bench # benchmarks
make cover # coverage report → coverage.html- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Run
make checkto verify everything passes - Commit with a clear message
- Push and open a Pull Request
Use concise, descriptive commit messages:
Add WithSampling option for probabilistic tracing
Fix race condition in entity metadata merge
- One logical change per PR
- Include tests for new functionality
- Update documentation if the public API changes
- Benchmarks must not regress — run
make benchand include results for performance-sensitive changes - All CI checks must pass
- Follow standard Go conventions (
gofmt,go vet) - Exported functions must have godoc comments
- Tests use the
testingpackage — no test framework dependencies - Benchmarks go in
bench_test.go - Examples go in
example_test.go(they appear on pkg.go.dev)
Stepmark's core promise is zero overhead when disabled. Any change to the hot path must:
- Maintain < 2ns / 0 allocs for disabled-path calls
- Not introduce new allocations on the disabled path
- Include benchmark results in the PR description
Use GitHub Issues. Include:
- Go version (
go version) - OS and architecture
- Minimal reproduction code
- Expected vs actual behavior
By contributing, you agree that your contributions will be licensed under the MIT License.