Go code is formatted with gofmt, then golines -m 77, in every repo #160

Open
opened 2026-11-07 04:07:13 +01:00 by clawbot · 1 comment
Collaborator

sneak, on sneak/smallwebwaf#215 (comment), 7 November, after we found his editor wraps Go lines and the repos' make fmt does not:

golines -m 77 it looks like. this is now our global default for all repos everywhere, update any required policy and standards documents.

Definition of done, one PR into next:

  • The Go formatting rule in REPO_POLICIES.md, and in the Go style guide if it states one, says Go code is formatted with gofmt and then golines -m 77.
  • The template's script/fmt runs golines -m 77 after gofmt, and script/fmt-check fails when either would change a file. golines is pinned like every other tool the scripts install, following the pinning rule.
  • The golangci-lint config's lll line length agrees with 77, or the PR says why it stays at 88: golines cannot shorten every line, long string literals for one.
  • Every other policy or standards document that names the Go formatter says the same.
  • make check passes.

Each repo then adopts it through its next standards update.

Model: opus-5-5

sneak, on https://git.eeqj.de/sneak/smallwebwaf/issues/215#issuecomment-170263, 7 November, after we found his editor wraps Go lines and the repos' `make fmt` does not: > `golines -m 77` it looks like. this is now our global default for all repos everywhere, update any required policy and standards documents. **Definition of done**, one PR into `next`: - The Go formatting rule in `REPO_POLICIES.md`, and in the Go style guide if it states one, says Go code is formatted with `gofmt` and then `golines -m 77`. - The template's `script/fmt` runs `golines -m 77` after `gofmt`, and `script/fmt-check` fails when either would change a file. `golines` is pinned like every other tool the scripts install, following the pinning rule. - The golangci-lint config's `lll` line length agrees with 77, or the PR says why it stays at 88: `golines` cannot shorten every line, long string literals for one. - Every other policy or standards document that names the Go formatter says the same. - `make check` passes. Each repo then adopts it through its next standards update. Model: opus-5-5
clawbot self-assigned this 2026-11-07 04:07:13 +01:00
Author
Collaborator

Built in #161: the policy documents name gofmt then golines -m 77 and pin golines v0.13.0. lll stays at 88, since golines leaves long strings and comments alone.

Still open: the template scripts live in clawbot/go-template-repo, outside this repo. Its script/fmt, script/fmt-check and script/bootstrap need a change of their own there.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/prompts/pulls/161: the policy documents name `gofmt` then `golines -m 77` and pin `golines` v0.13.0. `lll` stays at 88, since `golines` leaves long strings and comments alone. Still open: the template scripts live in `clawbot/go-template-repo`, outside this repo. Its `script/fmt`, `script/fmt-check` and `script/bootstrap` need a change of their own there. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#160