From 702cb9cbc74e58b0ef7c877d1920171e8df4f319 Mon Sep 17 00:00:00 2001 From: devantler Date: Fri, 26 Jun 2026 08:46:52 +0200 Subject: [PATCH] docs: document the pre-commit mockery hook in AGENTS.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AGENTS.md's repository-structure list described `.pre-commit-config.yaml` as "linting/spell-checking configuration" and omitted `.github/scripts/run-mockery.sh` entirely — but the pre-commit config's actual hooks are golangci-lint-fmt (Go formatting) and mockery mock generation via that script (lint/spell is `.mega-linter.yml` + `cspell.json`). Splits the bullet so each config is described accurately and adds a bullet for run-mockery.sh (a guarded no-op until a .mockery.yml/.yaml exists, so a fresh clone's hook stays green while the generation step is already wired). Keeps the agent file — read by Copilot code review and any agentic tool — in sync with what the repo actually does. Docs/prose only; no behaviour change. > 🤖 Generated by the Daily AI Assistant --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c07d7b8..3550b78 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,7 +20,9 @@ need. - `go.mod` / `go.sum` — module definition and checksums. - `.golangci.yml` — golangci-lint v2 config (formatters + `default: all` linters, with a few opt-outs and mock-file exclusions). - `.github/workflows/` — `ci.yaml` (required-checks aggregation on PRs/merge queue), `cd.yaml` (GoReleaser release on `v*` tags), `validate-scaffold.yaml` (template-repo-only gate that exercises the onboarding script — no-ops downstream), `release.yaml`, `sync-labels.yaml`, `todos.yaml`, and `copilot-setup-steps.yml`. -- `.pre-commit-config.yaml`, `.mega-linter.yml`, `cspell.json` — local linting/spell-checking configuration. +- `.pre-commit-config.yaml` — local pre-commit hooks: `golangci-lint-fmt` (Go formatting) and mock generation (`mockery`, via `.github/scripts/run-mockery.sh`). +- `.github/scripts/run-mockery.sh` — the pre-commit mockery hook's entry point; a guarded no-op until the project adds a `.mockery.yml`/`.mockery.yaml`, then runs `mockery` (so a fresh clone's hook stays green while the generation step is already wired). +- `.mega-linter.yml`, `cspell.json` — local linting/spell-checking configuration. - `scripts/rename-placeholders.sh` — one-shot onboarding: repoints the module path (`go.mod`, Go imports, README badges) to a new project's path, leaving the upstream **Use this template** links intact. - `scripts/rename-placeholders.test.sh` — end-to-end test for the onboarding script: runs it against a throwaway copy, then asserts the module repoint, the badge rewrite, the upstream-link preservation, no stray temp files, and that the renamed scaffold builds/tests. Run with `sh scripts/rename-placeholders.test.sh`; CI runs it via `validate-scaffold.yaml`.