Contributing¶
Contributions to Den are welcome. This guide covers the development setup and workflow.
Prerequisites¶
- mise -- tool version manager and task runner (install)
- PostgreSQL -- required for running the full test suite
mise installs the pinned Go toolchain plus golangci-lint, tparse, goimports, govulncheck, go-licenses, and pre-commit from .mise.toml. No separate installs needed.
Development Setup¶
Clone the repository and let mise install the pinned tools:
mise run setup installs the pinned tools and reports anything missing. Run pre-commit install afterwards to wire up the git hooks.
Running Tests¶
# Run all tests (SQLite + PostgreSQL)
mise run test
# Run tests with coverage report
mise run coverage
Tests run against both the SQLite and PostgreSQL backends. A local PostgreSQL instance must be available for the full test suite.
Linting¶
Runs golangci-lint run ./.... All code must pass linting before merge.
Formatting¶
Runs gofmt and goimports on all Go files.
Commit Messages¶
This project uses Conventional Commits. Every commit message must follow this format:
Types:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
refactor |
Code restructuring without behavior change |
test |
Adding or updating tests |
chore |
Build, CI, or tooling changes |
perf |
Performance improvement |
Examples:
feat: add StringContains operator for string fields
fix: handle nil pointer in link resolution
docs: update API reference with aggregation methods
Pull Requests¶
- Fork the repository
- Create a feature branch from
main - Make your changes with tests
- Ensure
mise run testandmise run lintpass - Submit a pull request
Reporting Issues¶
Please file issues on GitHub Issues. Include:
- Go version (
go version) - Backend (SQLite or PostgreSQL)
- Minimal reproduction case
- Expected vs actual behavior