From 6bee3ff9c0fbb642c6d251d45e3c70036226e8c7 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Wed, 21 Oct 2026 05:14:30 +0000 Subject: [PATCH 1/2] golangci: allow homoicon's local copy of sobek in gomoddirectives sneak/homoicon keeps a local copy of sobek, swapped in by a local-path replace that gomoddirectives refuses: https://git.eeqj.de/sneak/homoicon/issues/1759 Model: opus-5-5 --- .golangci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 32db9fe..3bc2c1c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -95,6 +95,15 @@ linters: recommendations: - github.com/aymanbagabas/go-udiff reason: "Unmaintained fork; use go-udiff." + exclusions: + rules: + # homoicon keeps a local copy of the JavaScript engine (sneak's decision, + # https://git.eeqj.de/sneak/homoicon/issues/1759#issuecomment-153261). + # Excluded, as gomoddirectives' replace-allow-list skips local paths. + - path: ^go\.mod$ + linters: + - gomoddirectives + text: '^local replacement are not allowed: github\.com/grafana/sobek$' issues: max-issues-per-linter: 0 -- 2.54.0 From af5c5f70261910feea7f017912d24b7ef52ffcbc Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 21 Oct 2026 14:50:27 +0000 Subject: [PATCH 2/2] Allow homoicon's local copy of sobek in the canonical .golangci.yml (closes #134) The comment above the gomoddirectives exclusion now names sobek and homoicon in plain sentences, links sneak's decision and says why this is an exclusion. TODO.md gains the dated Completed Steps entry. The rule itself is unchanged: a local replace of github.com/grafana/sobek in a repository's root go.mod passes, and every other local replace is still refused. Model: opus-5-5 --- .golangci.yml | 8 +++++--- TODO.md | 8 ++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3bc2c1c..1d6b3c6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -97,9 +97,11 @@ linters: reason: "Unmaintained fork; use go-udiff." exclusions: rules: - # homoicon keeps a local copy of the JavaScript engine (sneak's decision, - # https://git.eeqj.de/sneak/homoicon/issues/1759#issuecomment-153261). - # Excluded, as gomoddirectives' replace-allow-list skips local paths. + # homoicon keeps a local copy of sobek, its JavaScript engine, as sneak + # decided in + # https://git.eeqj.de/sneak/homoicon/issues/1759#issuecomment-153261. + # This is an exclusion because gomoddirectives does not check its + # replace-allow-list for a replace that points at a local path. - path: ^go\.mod$ linters: - gomoddirectives diff --git a/TODO.md b/TODO.md index 3e81cc2..8c927fd 100644 --- a/TODO.md +++ b/TODO.md @@ -21,6 +21,14 @@ fmt-check, and commit. # Completed Steps +- 2026-10-21: The canonical `.golangci.yml` now accepts a local `replace` of + `github.com/grafana/sobek` in a repository's root `go.mod` (issue 134), for + homoicon, which keeps a local copy of sobek on sneak's decision in + https://git.eeqj.de/sneak/homoicon/issues/1759#issuecomment-153261. Every + other local `replace` is still refused. It is an exclusion rather than a + `replace-allow-list` entry because gomoddirectives does not check that list + for a `replace` that points at a local path. homoicon picks this up on its + next re-vendor. - 2026-10-18: Check builds may now also keep Go's downloaded modules, golangci-lint's cache and the layers that install system packages (issue 130), on sneak's ruling there. In each stage of the canonical Go `Dockerfile`, the -- 2.54.0