Contributing¶
Thank you for considering contributing to Burrow! This guide explains how to set up a development environment and submit changes.
Prerequisites¶
- Go 1.25+ — go.dev/dl
- just — task runner (github.com/casey/just)
- pre-commit — git hook manager (pre-commit.com)
Additional tools (linter, test formatter, etc.) are checked automatically — see Development Setup below.
Development Setup¶
# Clone the repository
git clone https://github.com/oliverandrich/burrow.git
cd burrow
# Check that all required tools are installed
just setup
# Install git hooks
pre-commit install
just setup verifies that Go, golangci-lint, tparse, goimports, govulncheck, and pre-commit are available. It prints install instructions for anything missing.
Development Workflow¶
The justfile provides all common tasks:
| Command | Description |
|---|---|
just test |
Run all tests |
just lint |
Run golangci-lint |
just fmt |
Format all Go files (gofmt + goimports) |
just coverage |
Run tests with coverage report |
just tidy |
Tidy module dependencies |
just docs |
Serve documentation locally |
A typical workflow:
The pre-commit hooks run the linter, vulnerability checker, tests, and go mod tidy automatically on each commit.
Code Style¶
- Linting — golangci-lint with the project's
.golangci.ymlconfig. All code must passjust lintwithout warnings. - Testing — use testify (
assert,require) for all tests. - Commit messages — follow Conventional Commits (
feat:,fix:,docs:,refactor:,test:,chore:,perf:).
Project Structure¶
burrow.go # App interface, AppConfig struct
server.go # Server (boot sequence, middleware, graceful shutdown)
config.go # Config with CLI/ENV/TOML sourcing
registry.go # Registry for app management
contrib/ # Reusable apps (auth, session, csrf, i18n, admin, ...)
example/ # Example applications
docs/ # Documentation (this site)
Each contrib app follows a standard layout — see the Creating an App guide for the conventions.
Submitting Changes¶
- Fork the repository on GitHub.
- Create a branch from
mainwith a descriptive name (e.g.feat/widget-support,fix/session-race). - Make focused commits — each commit should represent one logical change.
- Ensure all checks pass —
just fmt && just lint && just test. - Open a pull request against
mainwith a clear description of what and why.
What we look for in reviews¶
- Tests for new functionality and bug fixes
- Clean commit history with conventional commit messages
- No unrelated changes mixed into the PR
- Code passes the linter without new warnings
License¶
By contributing, you agree that your contributions will be licensed under the European Union Public Licence v1.2 (EUPL-1.2).