fix: errcheck(e.Start / c.JSON)を解消 (#316)#372
Conversation
|
Warning Review limit reached
More reviews will be available in 46 minutes and 45 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
Changeserrcheck エラー未処理の解消
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Comment |
2100f9a to
5ed4a05
Compare
CodeRabbit は root 起点で golangci-lint を実行し api/ サブモジュールに 対して動かせない(#373)。回数無制限・クレジット非依存の GitHub Actions で working-directory: api 実行に置き換える。 - 既存 lint 負債(約74件)で全PRが赤くならないよう only-new-issues: true で 「PRで新規に増えた指摘」だけを対象にする - golangci-lint v2 対応のため action は v7、version は v2.12 - PR #372 のブランチ上で実地検証済み(golangci-lint 2.12.2 が api/ で動作、 --new-from-patch で新規0件 → 緑、45秒で完走) Refs #373
Summary
errcheck が指摘していた3件(
e.Start1件 +c.JSON2件)を解消する。これで errcheck は全体で 0 件(#358 / #359 と合わせて errcheck 完了)。Close #316
変更
server.go: サーバー起動エラーの処理
起動失敗(ポート競合など)は致命的なので、ログを出してプロセス終了する Echo の定石に統一。
user_controller.go GetCurrentUser: レスポンス書き込みエラーの伝播
c.JSONの error を Echo に伝播。あわせて「c.JSONを裸で呼んだ後return err」していた二重書き込みも解消。エラー時は 404 + user ボディを返す挙動。スコープ外(別途)
c.Request().Header["Access-Token"][0]はヘッダ不在で panic しうる(.Get("Access-Token")が安全)。errcheck の対象外のため本PRでは触れていない。Test plan
cd api && go build ./...通過golangci-lint run --enable-only errcheckが 0 issuesSummary by CodeRabbit
Release Notes