ci: golangci-lint の GitHub Actions を追加 (#373)#375
Conversation
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
|
Warning Review limit reached
More reviews will be available in 40 minutes and 43 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)
✨ 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 |
Summary
CodeRabbit は golangci-lint を root 起点で
./...実行し、Go モジュールが api/ サブディレクトリにある本リポでは原理的に動かせない(#373)。回数無制限・CodeRabbit のクレジットに非依存な GitHub Actions で golangci-lint をworking-directory: api実行に置き換える。Refs #373
ワークフロー
working-directory: api: go.mod のある api/ で実行。CodeRabbit のdirectory prefix . does not contain main moduleを構造的に回避。only-new-issues: true: 既存の lint 負債(ineffassign 約70・gosec 2・unused 2)で全PRが赤くならないよう、PR の差分で新規に増えた指摘だけを落とす(--new-from-patch)。version: v2.12(CodeRabbit と同じ系統)。実地検証済み
PR #372 のブランチ上でこのワークフローを動かし、成功を確認済み:
補足
.github/workflows/のみの変更でapi/**を含まないため、path filter によりこのPR自体では lint は起動しない(仕様)。develop マージ後、api/ を変更する以後の全PRで自動起動する。Test plan