Skip to content

Commit 2c87ddc

Browse files
committed
docs: add contribution guide
1 parent 9d43a34 commit 2c87ddc

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contributing to Kwelea
2+
3+
## Prerequisites
4+
5+
- Go (see `go.mod` for the minimum version)
6+
- [just](https://just.systems) -- task runner
7+
- [lefthook](https://github.com/evilmartians/lefthook) -- git hooks
8+
- [gotestsum](https://github.com/gotestyourself/gotestsum) -- test runner
9+
10+
```bash
11+
go install gotest.tools/gotestsum@latest
12+
lefthook install
13+
```
14+
15+
## Development workflow
16+
17+
```bash
18+
just build # compile the binary to bin/
19+
just test # run tests
20+
just check # format + vet
21+
just serve # build and serve kwelea's own docs (dogfood)
22+
```
23+
24+
Pre-commit hooks run `fmt`, `vet`, and `test` on changed `.go` files.
25+
26+
## Making changes
27+
28+
For non-trivial changes, open an [issue](https://github.com/engineervix/kwelea/issues) first to discuss the approach. Bug fixes and typos can go straight to a PR.
29+
30+
If you are proposing a feature, explain what problem it solves and keep the scope narrow — a focused PR is easier to review and more likely to land.
31+
32+
1. Fork the repo and create a branch (`feat/my-thing`, `fix/my-bug`).
33+
2. Write tests for new behaviour. Existing tests live in `internal/*/` alongside the code.
34+
3. Update `docs/` alongside the code if the change affects users.
35+
4. Open a pull request against `main`.
36+
37+
## Commit format
38+
39+
This project uses [Conventional Commits](https://www.conventionalcommits.org). The release changelog is generated automatically from commit messages, so the format matters.
40+
41+
```
42+
feat: add search highlighting for multi-word queries
43+
fix: resolve port conflict on dev server restart
44+
docs: clarify nav ordering in configuration guide
45+
chore: bump D2 to v0.7.2
46+
```
47+
48+
Types: `feat`, `fix`, `docs`, `test`, `refactor`, `chore`.
49+
Breaking changes: append `!` after the type (`feat!:`) and describe the break in the commit body.
50+
51+
## Running the full test suite
52+
53+
```bash
54+
just test-v # verbose output
55+
```
56+
57+
CI runs on Linux and macOS. Windows builds are cross-compiled in CI -- flag any platform-specific issues in your PR.

0 commit comments

Comments
 (0)