[ci] Suppress typecheck on the ui-wails embed instead of skipping main.go

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.
This commit is contained in:
Zoltán Papp
2026-05-06 15:50:14 +02:00
parent a8812d5fb1
commit 490b60ad0e

View File

@@ -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: