chore(ci): upgrade golangci-lint to v2 - #1420
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe change pins golangci-lint, replaces intermediate formatting allocations with direct builder writes, and makes ignored cleanup errors explicit in storage tests. Runtime output and test behavior remain unchanged. ChangesFormatting and cleanup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change pins lint tooling and performs formatting and test-cleanup updates without an identified runtime behavior regression. No merge-blocking risk is currently established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
A rabbit formats strings with care Comment |
Document touched test helpers and functions so docstring coverage meets the 80% pre-merge check on projectdiscovery#1420. Co-authored-by: Cursor <cursoragent@cursor.com>
Migrate the lint workflow to golangci-lint v2.4.0 with a pinned version and explicit config, and resolve pre-existing findings so CI passes on current main. Intended to merge before the Go 1.25 ACME fix in projectdiscovery#1419. Co-authored-by: Cursor <cursoragent@cursor.com>
Document touched test helpers and functions so docstring coverage meets the 80% pre-merge check on projectdiscovery#1420. Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Dwi Siswanto <git@dw1.io>
67c8a62 to
30fc9d4
Compare
|
@coderabbitai create an issue to track this, make it short, one paragraph. read this PR body for the context. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="projectdiscovery/interactsh"
pr_number="1420"
pr_url="https://github.com/projectdiscovery/interactsh/pull/1420"
comment_url=$(
gh api "repos/${repo}/issues/${pr_number}/comments" --paginate \
--jq '.[] | select(.user.login == "dwisiswant0" and (.body | contains("create an issue to track this"))) | .html_url' \
| head -n 1
)
if [ -z "$comment_url" ]; then
echo "Could not find the requesting comment URL." >&2
exit 1
fi
body="After `#1420` merges, run and verify the lint CI workflow with the pinned golangci-lint v2.4.0 configuration, `actions/setup-go` reading `go.mod`, and `golangci/golangci-lint-action@v8`; resolve any CI-only lint or configuration failures, then confirm the workflow passes so `#1419` can rebase on the updated `main`. Requested by `@dwisiswant0`. Context: ${pr_url}; request: ${comment_url}."
gh issue create \
--repo "$repo" \
--title "Validate golangci-lint v2 CI migration" \
--assignee "dwisiswant0" \
--body "$body"Length of output: 1711 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="projectdiscovery/interactsh"
pr_number="1420"
pr_url="https://github.com/projectdiscovery/interactsh/pull/1420"
comment_url=$(
gh api "repos/${repo}/issues/${pr_number}/comments" --paginate \
--jq '.[] | select(.user.login == "dwisiswant0" and (.body | contains("create an issue to track this"))) | .html_url' \
| head -n 1
)
if [ -z "$comment_url" ]; then
echo "Could not find the requesting comment URL." >&2
exit 1
fi
body=$(cat <<'EOF'
After `#1420` merges, run and verify the lint CI workflow with the pinned golangci-lint v2.4.0 configuration, `actions/setup-go` reading `go.mod`, and `golangci/golangci-lint-action@v8`; resolve any CI-only lint or configuration failures, then confirm the workflow passes so `#1419` can rebase on the updated `main`. Requested by `@dwisiswant0`.
EOF
)
body="${body} Context: ${pr_url}; request: ${comment_url}."
gh issue create \
--repo "$repo" \
--title "Validate golangci-lint v2 CI migration" \
--assignee "dwisiswant0" \
--body "$body"Length of output: 1234
You are interacting with an AI system. |
Summary
setup-goreads fromgo.mod,golangci-lint-action@v8This PR should merge before #1419. Once merged, rebase the ACME fix onto updated
main— the Go 1.25 bump in #1419 will then lint cleanly.Test plan
golangci-lint run --timeout 5mpasses locally (0 issues)go test ./pkg/storage/...passesMade with Cursor
Summary by CodeRabbit
Chores
Refactor
Tests