Skip to content

feat: add rate limiter #2

feat: add rate limiter

feat: add rate limiter #2

Triggered via pull request January 31, 2024 17:25
Status Failure
Total duration 26s
Artifacts

lint.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
Lint: pkg/infrared/infrared.go#L137
Error return value of `ir.sg.listenAndServe` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L184
Error return value of `ir.sg.listenAndServe` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L185
Error return value of `ir.listenAndServe` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L190
Error return value of `outConn.WritePackets` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L194
Error return value of `outConn.ReadPackets` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L195
Error return value of `outConn.WritePackets` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L196
Error return value of `outConn.ReadPackets` is not checked (errcheck)
Lint: pkg/infrared/rate_limiter.go#L226
Error return value of `h.WriteString` is not checked (errcheck)
Lint: pkg/infrared/rate_limiter.go#L227
Error return value of `h.WriteString` is not checked (errcheck)
Lint: pkg/infrared/infrared_test.go#L30
cognitive complexity 28 of func `BenchmarkInfrared_handleConn` is high (> 20) (gocognit)
Lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-go@v4, golangci/golangci-lint-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Lint: pkg/infrared/rate_limiter.go#L186
increment-decrement: should replace v.value += 1 with v.value++ (revive)