Thank you for your interest in contributing to Pocket! We welcome contributions from the community.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/pocket.git - Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Run tests:
go test ./... - Run linters:
golangci-lint run - Commit your changes
- Push to your fork
- Create a Pull Request
- Go 1.21 or higher
- golangci-lint (optional but recommended)
Install development tools:
# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Install other tools
go install golang.org/x/vuln/cmd/govulncheck@latest
go install honnef.co/go/tools/cmd/staticcheck@latest# Run all tests
go test ./...
# Run tests with race detector
go test -race ./...
# Run tests with coverage
go test -cover ./...
# Generate coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out# Run golangci-lint
golangci-lint run
# Run specific linters
go vet ./...
gofmt -l .
staticcheck ./...
govulncheck ./...- Follow standard Go conventions
- Use
gofmtfor formatting - Write clear, self-documenting code
- Add comments for exported types and functions
- Keep functions small and focused
- Prefer composition over inheritance
- Write tests for all new functionality
- Maintain or improve code coverage
- Use table-driven tests where appropriate
- Test edge cases and error conditions
- Run tests with race detector
- Ensure all tests pass
- Ensure code passes all linters
- Update documentation as needed
- Add examples if introducing new features
- Update README.md if necessary
- Ensure your PR has a clear description
Follow conventional commit format:
type(scope): subject
body
footer
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting, etc)
- refactor: Code refactoring
- test: Test changes
- chore: Build process or auxiliary tool changes
Pocket follows semantic versioning (semver). To create a new release:
- Ensure all tests pass on master branch
- Update version references if needed
- Create and push a version tag:
# For patch release (bug fixes)
git tag v0.1.1
git push origin v0.1.1
# For minor release (new features)
git tag v0.2.0
git push origin v0.2.0
# For major release (breaking changes)
git tag v1.0.0
git push origin v1.0.0The release workflow will automatically:
- Run all tests
- Run linters
- Create a GitHub release
- Generate changelog from commits
- Open an issue for bugs or feature requests
- Join discussions in issues and pull requests
- Check existing issues before creating new ones
Please be respectful and inclusive in all interactions. We strive to maintain a welcoming community for all contributors.