ci: support Go 1.26 linting #77
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
go
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pokebedrock/gobds!77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "manish/fix-go126-golangci-lint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Verification
golangci-lint run --timeout=5mgo test ./...This unblocks the current Dependabot PRs, which are all failing before lint analysis with:
Summary by CodeRabbit
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
5f261b7a-707f-4eb3-b36a-fd401b1acdb3📥 Commits
Reviewing files that changed from the base of the PR and between
47e9b29a96and57bf61140f.📒 Files selected for processing (1)
gobds/service/vpn/service.go🚧 Files skipped from review as they are similar to previous changes (1)
📝 Walkthrough
Walkthrough
This PR bumps the golangci-lint-action version, fixes two comment typos, refactors AFK warning logic in gobds/afk.go into two helper methods, refactors VPN CheckIP whitelist/rate-limit logic into two helper methods, and changes ButtonTypes() to preallocate its result slice.
Changes
Refactors and minor updates
gobds/afk.goevaluateAFKare replaced with calls to newwarnAFKSessionsandwarnFinalAFKSessionshelper methods, with an addedinfraimport.gobds/service/vpn/service.goCheckIPnow delegates whitelist checking and rate-limit checking to newisWhitelistedandrateLimitActivehelper methods instead of inline logic.gobds/block/button_type.go,.github/workflows/lint.yml,filterlog.go,gobds/status.goButtonTypes()preallocates its slice and appends entries;golangci-lint-actionversion is bumped; comment typos are corrected infilterlog.goandgobds/status.go.Estimated code review effort: 2 (Simple) | ~12 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
1c0972df-f884-47b5-a6fc-fb330ec349f2📥 Commits
Reviewing files that changed from the base of the PR and between
d9fab62fbband47e9b29a96.📒 Files selected for processing (6)
.github/workflows/lint.ymlfilterlog.gogobds/afk.gogobds/block/button_type.gogobds/service/vpn/service.gogobds/status.go🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Unlocked read of
s.rateLimitResetin rate-limit error message.rateLimitActive()correctly checkss.rateLimitResetunder the lock, but line 54 readss.rateLimitResetagain outside the lock to format the error. This is a data race withhandleRateLimitHeaders(line 144), which writess.rateLimitResetunders.mu. The downstream consumer ingobds/gobds.go:211surfaces this error string directly to users, so a torn read could display a stale or inconsistent reset time.Fix by returning the captured value from
rateLimitActive:And at the call site:
Also applies to: 125-129
🤖 Prompt for AI Agents
✅ Addressed in commit
57bf611