From 490b60ad0e9df0505d6652e38127408710150be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 6 May 2026 15:50:14 +0200 Subject: [PATCH] [ci] Suppress typecheck on the ui-wails embed instead of skipping main.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous attempt added client/ui-wails/main.go to the file path exclude list, but golangci-lint v2's path filter only suppresses issues from rule-based linters; the typecheck pre-pass that compiles the package still runs and fails with "pattern all:frontend/dist: no matching files found" before any rule fires. Replace the path-level skip with a targeted exclusions.rules entry that matches just that diagnostic on just that file. The rest of client/ui-wails (services/, tray.go, grpc.go, ...) keeps being linted normally. Validated locally by deleting frontend/dist and running `golangci-lint run client/ui-wails/...` — 0 issues with this config. --- .golangci.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index d1b7ac271..7883961c3 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -114,16 +114,20 @@ linters: - linters: - staticcheck text: "QF1012" + # client/ui-wails/main.go uses //go:embed all:frontend/dist; the + # directory is populated by `pnpm build` in the release pipeline + # and missing at lint time, so the embed parses to "no matching + # files found" — surfaced by golangci-lint's typecheck pre-pass. + # Suppress just that one diagnostic; the rest of the package + # (services/, tray.go, grpc.go, ...) still gets linted normally. + - linters: + - typecheck + path: client/ui-wails/main\.go + text: "pattern all:frontend/dist" paths: - third_party$ - builtin$ - examples$ - # client/ui-wails/main.go uses //go:embed all:frontend/dist; that - # directory is populated by `pnpm build` in the release pipeline - # and is missing at lint time, so the typecheck phase fails before - # any rule runs. Skip just main.go — the rest of the package - # (services/, tray.go, grpc.go, ...) still gets linted. - - client/ui-wails/main\.go$ issues: max-same-issues: 5 formatters: