This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new aa6b82e1c chore(lint): fix revive unhandled-error findings in 
pluginsgen (#9353)
aa6b82e1c is described below

commit aa6b82e1cfe272e0940d362251cbb71a23a8908a
Author: Dirk <[email protected]>
AuthorDate: Tue Nov 10 12:10:50 2026 +0100

    chore(lint): fix revive unhandled-error findings in pluginsgen (#9353)
    
    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 <[email protected]>
---
 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 278777a3a..bba6837e9 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 2416631bb..a5c722ed7 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)
        }
 }

Reply via email to