Style, PRs and licence
Code style
Section titled “Code style”- Formatting is gofmt, gofumpt and goimports (
task fmt). The pre-commit hook applies it. - Linting is golangci-lint with the repository’s
.golangci.yml, which adds gosec, errorlint, revive and others to the standard set. A//nolintneeds a reason and the specific linter. - Spelling is UK English, in code comments and in the interface: “colour”, “organise”, “licence” (the noun). misspell checks it, apart from Go names like
color. - Standard library first.
net/http,html/templateand htmx cover the web side. Add a dependency only when it clearly earns its place. - Logging uses
log/slogwith key-value attributes. - Comments explain why, not what. Every exported name has a doc comment.
Writing for the interface
Section titled “Writing for the interface”The interface talks to families, kids included:
- Use short, plain sentences.
- Use the words people already use: “chores”, “points”, “pocket money”, “a grown-up”.
- Name buttons after what they do: Save for this, Give back, Not done yet.
- Use British dates and times: DD/MM/YYYY and the 24-hour clock.
Branches and commits
Section titled “Branches and commits”- Work happens on a branch per Linear issue, named after it, such as
luke/dom-36-only-on-the-day-chores. - Before a release, features merge into the next version’s branch (
v0.2), which then merges intomainto release. - Commit and PR titles start with the issue and describe the change for a reader:
DOM-36: Only on the day chores come off the board once their time has passed.
Pull requests
Section titled “Pull requests”A PR description has:
- Closes DOM-NN, linking the issue.
- What changes: what someone using Ingle will notice, then the technical detail (schema changes, new routes, anything surprising).
- Testing:
task check, the new tests, and what you checked in the browser and at what size. - Docs: a link to the matching ingle-site PR, or “none needed”. Anything someone using or running Ingle would notice needs one: a new screen or option, a changed label, a new setting or command, a change to the deploy files. If it changes what a screenshot shows, re-run
npm run screenshotsthere.
Add the change to CHANGELOG.md under ## [Unreleased], written for the people who run Ingle. A database change or anything people must do when they upgrade also goes under Upgrade notes.
Licence
Section titled “Licence”Ingle is licensed under the GNU AGPL-3.0. You’re free to self-host, modify and share Ingle. If you run a modified version as a service for other people, you must make your source code available to them. Contributions are made under the same licence.