code-style · git:20261013.10eb20e · 2026-10-13 · sha256 bb036e99ebfca809
code-style git:20261013.10eb20eA
Immutable. This exact content never changes and is served at /api/v1/blob/bb036e99ebfca809.
--- 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`**): **`make fmt-check`** (`gofmt -s -l` over every Go file git tracks, whatever its build tags or platform), `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 five linters it names (golangci-lint's `standard` set), so an unformatted file fails the gate; `gofmt -s -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