From b4378942fc33c6636846a80b00d4d45422d396e2 Mon Sep 17 00:00:00 2001 From: shankar0123 Date: Tue, 12 May 2026 14:25:37 +0000 Subject: [PATCH] fix(ciparity): drop unused methodPathRe regex (golangci-lint cleanup) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit golangci-lint v2.11.4 surfaced one finding against the bundle's new code: 'var methodPathRe is unused' in internal/ciparity/surface_parity_test.go:46. The regex was leftover scaffolding from when I drafted the file as a package-router test before moving it into the stdlib-only ciparity package. The router-route scanner in this package uses its own inline regex (registerRe + muxHandleRe via scanRouterRoutes) and never reads methodPathRe. Verified clean against the two bundle packages: - golangci-lint run --timeout 5m ./internal/ciparity/... ./internal/config/... → 0 issues - gofmt -l → no output - go vet → clean - go test -short -count=1 → ciparity 0.017s, config 0.727s Audit-Closes: post-v2.1.0-anti-rot/item-2 --- internal/ciparity/surface_parity_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/ciparity/surface_parity_test.go b/internal/ciparity/surface_parity_test.go index 795f115..f674e5e 100644 --- a/internal/ciparity/surface_parity_test.go +++ b/internal/ciparity/surface_parity_test.go @@ -43,7 +43,6 @@ const mcpBaselineFloor = 150 var ( mcpToolNameRe = regexp.MustCompile(`^certctl_[a-z][a-z0-9_]*[a-z0-9]$`) mcpNameDeclRe = regexp.MustCompile(`Name:\s*"(certctl_[a-z0-9_]+)"`) - methodPathRe = regexp.MustCompile(`^(GET|POST|PUT|DELETE|PATCH|OPTIONS|HEAD) /`) openapiPathRe = regexp.MustCompile(`^ (/[^:]+):\s*$`) openapiVerbRe = regexp.MustCompile(`^ (get|post|put|delete|patch|options|head):\s*$`) caseLiteralRe = regexp.MustCompile(`case\s+"([a-z\-]+)":`)