Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f01ca24dc2 | ||
|
|
2e98be476a | ||
|
|
6dcacf673f |
No files matched your search
@@ -21,11 +21,13 @@ fmt-check, and commit.
|
|||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
- 2026-11-07: Go code is now formatted with `gofmt` and then `golines -m 77`
|
- 2026-11-06: Compacted `prompts/REPO_POLICIES.md` from 1,145 lines and 8,427
|
||||||
(https://git.eeqj.de/sneak/prompts/issues/160). `prompts/REPO_POLICIES.md`
|
words to 1,066 lines and 7,812 words
|
||||||
says how `script/fmt`, `script/fmt-check` and `script/bootstrap` do it and
|
(https://git.eeqj.de/sneak/prompts/issues/158). Every rule keeps its meaning.
|
||||||
pins `golines`. The Go style guide and both checklists say the same. `lll`
|
The rules now sit under headings, the pinning rule first. Each rule that was
|
||||||
stays at 88, since `golines` leaves long strings and comments as they are.
|
stated in several places is stated once. The Makefile copies of the Go and
|
||||||
|
Python test commands are gone, because the `Dockerfile` examples carry the
|
||||||
|
same commands. Both checklists name the `.golangci.yml` section.
|
||||||
- 2026-11-06: The pinning rule in `prompts/REPO_POLICIES.md` now opens with its
|
- 2026-11-06: The pinning rule in `prompts/REPO_POLICIES.md` now opens with its
|
||||||
scope: what we download and install ourselves in scripts and Dockerfiles
|
scope: what we download and install ourselves in scripts and Dockerfiles
|
||||||
(https://git.eeqj.de/sneak/prompts/issues/154). Distribution packages are
|
(https://git.eeqj.de/sneak/prompts/issues/154). Distribution packages are
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: Code Styleguide — Go
|
title: Code Styleguide — Go
|
||||||
last_modified: 2026-11-07
|
last_modified: 2026-10-18
|
||||||
---
|
---
|
||||||
|
|
||||||
1. Format Go code with `gofmt` and then `golines -m 77`, through `make fmt`.
|
1. Try to hard wrap long lines at 77 characters or less.
|
||||||
Don't commit anything `make fmt` would change. The only exception is when
|
|
||||||
committing things that aren't yet syntactically valid, which should only
|
|
||||||
happen pre-v0.0.1 or on a non-`main` branch.
|
|
||||||
|
|
||||||
1. Hard wrap long lines at 77 characters or less. `golines` does this for code.
|
1. Don't commit anything that hasn't been `go fmt`'d. The only exception is
|
||||||
Wrap comments and long string literals by hand, since `golines` leaves them
|
when committing things that aren't yet syntactically valid, which should
|
||||||
as they are.
|
only happen pre-v0.0.1 or on a non-`main` branch.
|
||||||
|
|
||||||
1. Even if you are planning to deal with only positive integers, use
|
1. Even if you are planning to deal with only positive integers, use
|
||||||
`int`/`int64` types instead of `uint`/`uint64` types. This is for
|
`int`/`int64` types instead of `uint`/`uint64` types. This is for
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: Existing Repo Checklist
|
title: Existing Repo Checklist
|
||||||
last_modified: 2026-11-07
|
last_modified: 2026-11-06
|
||||||
---
|
---
|
||||||
|
|
||||||
Use this checklist when beginning work in a repo that may not yet conform to our
|
Use this checklist when beginning work in a repo that may not yet conform to our
|
||||||
@@ -163,7 +163,7 @@ with your task.
|
|||||||
- [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` (fetch from
|
- [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` (fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
||||||
in the same commit, set the lint phase digest to the one named in the
|
in the same commit, set the lint phase digest to the one named in the
|
||||||
`.golangci.yml` paragraph of `REPO_POLICIES.md`)
|
`.golangci.yml` section of `REPO_POLICIES.md`)
|
||||||
- [ ] JS: `package.json`, `yarn.lock`, `.yarnrc.yml`, `.yarn/releases/`,
|
- [ ] JS: `package.json`, `yarn.lock`, `.yarnrc.yml`, `.yarn/releases/`,
|
||||||
`.gitattributes`, `.prettierrc`, `.prettierignore` (fetch the last two
|
`.gitattributes`, `.prettierrc`, `.prettierignore` (fetch the last two
|
||||||
from `https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc`
|
from `https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc`
|
||||||
@@ -259,13 +259,8 @@ with your task.
|
|||||||
|
|
||||||
# Formatting
|
# Formatting
|
||||||
|
|
||||||
- [ ] Platform-standard formatter is configured (`black`, `prettier`, and for Go
|
- [ ] Platform-standard formatter is configured (`black`, `prettier`, `go fmt`)
|
||||||
`gofmt` then `golines -m 77`)
|
- [ ] Default formatter config, only exception: four-space indents (except Go)
|
||||||
- [ ] Default formatter config, except four-space indents (not Go),
|
|
||||||
`proseWrap: always` for Markdown, and the Go 77-column limit
|
|
||||||
- [ ] Go: `script/bootstrap` installs `golines` with `go install` pinned to a
|
|
||||||
commit hash; `script/fmt-check` fails when `gofmt` or `golines -m 77`
|
|
||||||
would change a file
|
|
||||||
- [ ] All files pass `make fmt-check`
|
- [ ] All files pass `make fmt-check`
|
||||||
|
|
||||||
# Git Hygiene
|
# Git Hygiene
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: New Repo Checklist
|
title: New Repo Checklist
|
||||||
last_modified: 2026-11-07
|
last_modified: 2026-11-06
|
||||||
---
|
---
|
||||||
|
|
||||||
Use this checklist when creating a new repository from scratch. Follow the steps
|
Use this checklist when creating a new repository from scratch. Follow the steps
|
||||||
@@ -178,7 +178,7 @@ Template files can be fetched from:
|
|||||||
- [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` (fetch from
|
- [ ] Go: `go mod init sneak.berlin/go/<name>`, `.golangci.yml` (fetch from
|
||||||
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
`https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml` and,
|
||||||
in the same commit, set the lint phase digest to the one named in the
|
in the same commit, set the lint phase digest to the one named in the
|
||||||
`.golangci.yml` paragraph of `REPO_POLICIES.md`)
|
`.golangci.yml` section of `REPO_POLICIES.md`)
|
||||||
- [ ] JS, or any repository that runs prettier through yarn: make the first
|
- [ ] JS, or any repository that runs prettier through yarn: make the first
|
||||||
`yarn.lock` with the steps below. `script/bootstrap` installs no yarn
|
`yarn.lock` with the steps below. `script/bootstrap` installs no yarn
|
||||||
until `yarn.lock` exists, so run them with any distribution's node and
|
until `yarn.lock` exists, so run them with any distribution's node and
|
||||||
@@ -233,11 +233,9 @@ are thin shims calling them. Model scripts:
|
|||||||
which writes no image. No lint verdict may come from a host invocation of
|
which writes no image. No lint verdict may come from a host invocation of
|
||||||
the linter.
|
the linter.
|
||||||
- [ ] `script/fmt` / `make fmt` — formats code (writes; native, never in a
|
- [ ] `script/fmt` / `make fmt` — formats code (writes; native, never in a
|
||||||
container). Go code gets `gofmt`, then `golines -m 77`.
|
container)
|
||||||
- [ ] `script/fmt-check` / `make fmt-check` — checks formatting (read-only;
|
- [ ] `script/fmt-check` / `make fmt-check` — checks formatting (read-only;
|
||||||
native). Fails when `gofmt` or `golines -m 77` would change a Go file.
|
native)
|
||||||
- [ ] Go: `script/bootstrap` installs `golines` with `go install` pinned to a
|
|
||||||
commit hash
|
|
||||||
- [ ] `script/check` / `make check` — runs `test`, `lint`, `fmt-check`; must not
|
- [ ] `script/check` / `make check` — runs `test`, `lint`, `fmt-check`; must not
|
||||||
modify files
|
modify files
|
||||||
- [ ] `script/projectname` — outputs the project name (used by `script/docker`
|
- [ ] `script/projectname` — outputs the project name (used by `script/docker`
|
||||||
|
|||||||
+853
-952
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user