code-style · git:20261013.838a5e0 · 2026-10-13 · sha256 2681a990150d6a08
code-style git:20261013.838a5e0A
Immutable. This exact content never changes and is served at /api/v1/blob/2681a990150d6a08.
--- 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 default linters, 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