DoDiODev opened a new pull request, #9353:
URL: https://github.com/apache/devlake/pull/9353

   ### ⚠️ Pre Checklist
   
   > Please complete _ALL_ items in this checklist, and remove before submitting
   
   - [x] I have read through the [Contributing 
Documentation](https://devlake.apache.org/community/).
   - [x] I have added relevant tests. (N/A — lint only, no behavior change)
   - [x] I have added relevant documentation. (N/A)
   - [x] I will add labels to the PR, such as `pr-type/bug-fix`, 
`pr-type/feature-development`, etc.
     (I can't set labels myself; suggested: `pr-type/refactor`, 
`component/framework`)
   
   ### Summary
   
   `make lint` fails locally on macOS with four revive findings in
   `tools/pluginsgen/main.go` (added in #9288):
   
   ```
   tools/pluginsgen/main.go:81:3: unhandled-error: Unhandled error in call to 
function fmt.Fprintf (revive)
   tools/pluginsgen/main.go:245:2: unhandled-error: Unhandled error in call to 
function bytes.Buffer.WriteString (revive)
   ... (16 WriteString calls in total)
   ```
   
   CI does not report them. With the same golangci-lint v2.15.0 and the same
   config, revive's `unhandled-error` does not fire on Linux at all (checked 
with
   the official `golangci/golangci-lint:v2.15.0` image and a minimal file). This
   matches golangci/golangci-lint#5580: some typed revive rules silently stop
   working in golangci-lint depending on the Go toolchain setup.
   
   Fix:
   
   - `.golangci.yaml`: add `bytes.Buffer.WriteString` to the `unhandled-error`
     ignore list. It is documented to always return a nil error; `fmt.Printf`,
     `fmt.Println` and `fmt.Fprintln` are already listed.
   - `pluginsgen`: print the error with `fmt.Fprintln(os.Stderr, "pluginsgen:", 
err)`
     (same output, already on the ignore list).
   
   ### Does this close any open issues?
   
   N/A
   
   ### Screenshots
   
   N/A
   
   ### Other Information
   
   - `cd backend && make mock && golangci-lint run` on macOS (golangci-lint
     v2.15.0, go1.27.3): 4 issues before, `0 issues.` after.
   - `go build ./tools/pluginsgen`: OK.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to