From 03bf0b8445e590f9275c8c848ccc5f33dd95218a Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 22 Feb 2026 16:52:33 +0100 Subject: [PATCH] Add authoritative URLs to checklists and copy .golangci.yml - Add .golangci.yml from upaas as authoritative copy in this repo - Update REPO_POLICIES.md to reference .golangci.yml by URL - Add fetch URLs for all template files in both checklists: .gitignore, .editorconfig, Makefile, .prettierrc, .prettierignore, REPO_POLICIES.md, .golangci.yml, check.yml --- .golangci.yml | 32 ++++++++++++++++++++++++++++++ prompts/EXISTING_REPO_CHECKLIST.md | 17 +++++++++++----- prompts/NEW_REPO_CHECKLIST.md | 27 +++++++++++++++---------- prompts/REPO_POLICIES.md | 3 ++- 4 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..34a8e31 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,32 @@ +version: "2" + +run: + timeout: 5m + modules-download-mode: readonly + +linters: + default: all + disable: + # Genuinely incompatible with project patterns + - exhaustruct # Requires all struct fields + - depguard # Dependency allow/block lists + - godot # Requires comments to end with periods + - wsl # Deprecated, replaced by wsl_v5 + - wrapcheck # Too verbose for internal packages + - varnamelen # Short names like db, id are idiomatic Go + +linters-settings: + lll: + line-length: 88 + funlen: + lines: 80 + statements: 50 + cyclop: + max-complexity: 15 + dupl: + threshold: 100 + +issues: + exclude-use-default: false + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/prompts/EXISTING_REPO_CHECKLIST.md b/prompts/EXISTING_REPO_CHECKLIST.md index 0efd7da..936ef78 100644 --- a/prompts/EXISTING_REPO_CHECKLIST.md +++ b/prompts/EXISTING_REPO_CHECKLIST.md @@ -23,16 +23,23 @@ with your task. - [ ] `.gitignore` is comprehensive (OS, editor, language artifacts, secrets) — fetch from `https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore` if missing -- [ ] `.editorconfig` exists +- [ ] [`.editorconfig`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.editorconfig) + exists - [ ] `Dockerfile` and `.dockerignore` exist; Dockerfile runs `make check` as a build step - [ ] Gitea Actions workflow in `.gitea/workflows/` runs `docker build .` on - push + push — reference + [check.yml](https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml) - [ ] Language-specific config: - - [ ] Go: `go.mod`, `go.sum`, `.golangci.yml` - - [ ] JS: `package.json`, `yarn.lock`, `.prettierrc`, `.prettierignore` + - [ ] Go: `go.mod`, `go.sum`, + [`.golangci.yml`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml) + - [ ] JS: `package.json`, `yarn.lock`, + [`.prettierrc`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc), + [`.prettierignore`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierignore) - [ ] Python: `pyproject.toml` - - [ ] Docs/writing: `.prettierrc`, `.prettierignore` + - [ ] Docs/writing: + [`.prettierrc`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc), + [`.prettierignore`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierignore) ## Makefile diff --git a/prompts/NEW_REPO_CHECKLIST.md b/prompts/NEW_REPO_CHECKLIST.md index 458794d..66e9a7b 100644 --- a/prompts/NEW_REPO_CHECKLIST.md +++ b/prompts/NEW_REPO_CHECKLIST.md @@ -30,28 +30,33 @@ Template files can be fetched from: ### Fetch Template Files -- [ ] `.gitignore` — fetch from prompts repo, extend for language-specific - artifacts -- [ ] `.editorconfig` — fetch from prompts repo -- [ ] `Makefile` — fetch from prompts repo, adapt targets for the project's - language and tools -- [ ] For JS/docs repos: `.prettierrc`, `.prettierignore` +- [ ] [`.gitignore`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitignore) + — fetch from prompts repo, extend for language-specific artifacts +- [ ] [`.editorconfig`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.editorconfig) + — fetch from prompts repo +- [ ] [`Makefile`](https://git.eeqj.de/sneak/prompts/raw/branch/main/Makefile) — + fetch from prompts repo, adapt targets for the project's language and + tools +- [ ] For JS/docs repos: + [`.prettierrc`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierrc), + [`.prettierignore`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.prettierignore) ### Create Project Files - [ ] `LICENSE` file matching the chosen license -- [ ] `REPO_POLICIES.md` — fetch from `prompts/REPO_POLICIES.md` in the prompts - repo +- [ ] [`REPO_POLICIES.md`](https://git.eeqj.de/sneak/prompts/raw/branch/main/prompts/REPO_POLICIES.md) + — fetch from prompts repo - [ ] `Dockerfile` and `.dockerignore` - All Dockerfiles must run `make check` as a build step - Server: also builds and runs the application - Non-server: brings up dev environment and runs `make check` - Image pinned by sha256 hash with version/date comment - [ ] Gitea Actions workflow at `.gitea/workflows/check.yml` that runs - `docker build .` on push + `docker build .` on push — reference + [`check.yml`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.gitea/workflows/check.yml) - [ ] Language-specific: - - [ ] Go: `go mod init sneak.berlin/go/`, `.golangci.yml` (copy from - `~/dev/upaas/.golangci.yml`) + - [ ] Go: `go mod init sneak.berlin/go/`, + [`.golangci.yml`](https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml) - [ ] JS: `yarn init`, `yarn add --dev prettier` - [ ] Python: `pyproject.toml` diff --git a/prompts/REPO_POLICIES.md b/prompts/REPO_POLICIES.md index 57f380d..cec78a2 100644 --- a/prompts/REPO_POLICIES.md +++ b/prompts/REPO_POLICIES.md @@ -89,7 +89,8 @@ style conventions are in separate documents: feature branch. - `.golangci.yml` is standardized and must _NEVER_ be modified by an agent, only - manually by the user. Copy from `~/dev/upaas/.golangci.yml` if available. + manually by the user. Fetch from + `https://git.eeqj.de/sneak/prompts/raw/branch/main/.golangci.yml`. - When pinning images or packages by hash, add a comment above the reference with the version and date (YYYY-MM-DD).