From 2732983954b0cd1b0587ecf1841ec275bae208b9 Mon Sep 17 00:00:00 2001 From: DoDiODev Date: Mon, 9 Nov 2026 14:23:06 +0100 Subject: [PATCH] chore(lint): fix revive unhandled-error findings in pluginsgen Local golangci-lint runs (e.g. on macOS) report unhandled-error for tools/pluginsgen. CI does not, because revive's typed rules can silently stop working in golangci-lint depending on the Go toolchain setup (golangci/golangci-lint#5580). - Ignore bytes.Buffer.WriteString: it always returns a nil error. - Use fmt.Fprintln for the error message, which is already ignored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- backend/.golangci.yaml | 1 + backend/tools/pluginsgen/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/.golangci.yaml b/backend/.golangci.yaml index 278777a3a7d..bba6837e9f8 100644 --- a/backend/.golangci.yaml +++ b/backend/.golangci.yaml @@ -193,6 +193,7 @@ linters: - fmt.Printf - fmt.Println - fmt.Fprintln + - bytes.Buffer.WriteString - res.Body.Close - body.Close severity: warning diff --git a/backend/tools/pluginsgen/main.go b/backend/tools/pluginsgen/main.go index 2416631bbfc..a5c722ed796 100644 --- a/backend/tools/pluginsgen/main.go +++ b/backend/tools/pluginsgen/main.go @@ -78,7 +78,7 @@ func main() { flag.Parse() if err := run(*root, *out, *subset); err != nil { - fmt.Fprintf(os.Stderr, "pluginsgen: %v\n", err) + fmt.Fprintln(os.Stderr, "pluginsgen:", err) os.Exit(1) } }