code-style · git:20261009.3e5365f · 2026-10-09 · sha256 880992fca4a1ccf5
code-style git:20261009.3e5365fA
Immutable. This exact content never changes and is served at /api/v1/blob/880992fca4a1ccf5.
--- description: Formatting, lint, comments language globs: **/*.go alwaysApply: false --- # Code style (Go) 1. **`gofmt`** / **`go fmt`** - format before committing when you touch files. 2. **`make lint`** - the repo gate (see **`Makefile`**): `golangci-lint` over the untagged tree, over every tag but `ui` and over the shipped tag set, then `tsc --noEmit` over the SPA sources (`make ui-typecheck`). **`.golangci.yml`** enables the `gofmt` formatter (`gofmt -s`) beside the default linters, so an unformatted file fails the gate; `gofmt -w <file>` or `golangci-lint fmt` fixes it. 3. Comments in code - **English only**. 4. Follow existing patterns in neighboring files (imports grouping, naming, error handling). ## References @Makefile