chore: update golangci action - #520
Conversation
update to golangci-lint 2.12.2 and remove the obsolete `skip-pkg-cache` and `skip-build-cache` (because the cache related to Go itself is already handled by `actions/setup-go`) Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
WalkthroughThe CI workflow now uses GolangCI ChangesCI lint update
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-build.yml:
- Line 28: Update the GolangCI-Lint version used by the CI dependency
verification workflow to v2.12.2, ensuring the configuration consumed by
verify-dependencies and its verify-replace-run flow installs that exact version
for lint-go-code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: b33aca92-a798-423e-829d-701017f8be75
📒 Files selected for processing (1)
.github/workflows/ci-build.yml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
codeready-toolchain/api(manual)codeready-toolchain/toolchain-common(manual)codeready-toolchain/host-operator(manual)codeready-toolchain/toolchain-e2e(manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: Verify Dependencies
- GitHub Check: govulncheck
- GitHub Check: GolangCI Lint
| version: v2.1.6 | ||
| skip-pkg-cache: true | ||
| skip-build-cache: true | ||
| version: v2.12.2 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 3 'golangci|v2\.[0-9]+\.[0-9]+' .github/workflows .golangci.ymlRepository: codeready-toolchain/api
Length of output: 1659
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- verify-dependencies.yml ---'
cat -n .github/workflows/verify-dependencies.yml
printf '%s\n' '--- ci-build.yml ---'
cat -n .github/workflows/ci-build.yml
printf '%s\n' '--- lint configuration references ---'
rg -n -C 4 'golangci|golangci-lint|\.golangci|lint' .github .golangci.yml Makefile* 2>/dev/null || trueRepository: codeready-toolchain/api
Length of output: 4400
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
for path in [Path(".github/workflows/verify-dependencies.yml"),
Path(".github/workflows/ci-build.yml")]:
text = path.read_text()
print(f"--- {path} ---")
for i, line in enumerate(text.splitlines(), 1):
if re.search(r"golangci|lint|verify|\.golangci", line, re.I):
print(f"{i}: {line}")
PY
printf '%s\n' '--- workflow triggers and job commands ---'
sed -n '1,120p' .github/workflows/verify-dependencies.yml
sed -n '1,100p' .github/workflows/ci-build.ymlRepository: codeready-toolchain/api
Length of output: 1890
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- verify-replace-run definition and references ---'
rg -n -C 8 'verify-replace-run|golangci-lint|\.golangci\.yml' --glob 'Makefile*' --glob '*.mk' --glob '*.yml' --glob '*.yaml' --glob '*.sh' .Repository: codeready-toolchain/api
Length of output: 1582
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- make composition ---'
sed -n '1,180p' Makefile
printf '%s\n' '--- verify-replace.sh ---'
cat -n scripts/verify-replace.sh
printf '%s\n' '--- lint target dependencies ---'
rg -n -C 5 'lint-go-code|lint-yaml|lint:' Makefile make scripts .github 2>/dev/null || trueRepository: codeready-toolchain/api
Length of output: 6113
🏁 Script executed on selected repositories:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- verification targets and GolangCI-Lint usage ---'
rg -n -C 6 '(^|[[:space:]])(pre-verify|verify-dependencies|lint-go-code|lint:)|golangci-lint|\.golangci\.yml' \
Makefile make scripts .github 2>/dev/null || true
Repositories: codeready-toolchain/toolchain-common, codeready-toolchain/host-operator, codeready-toolchain/toolchain-e2e
Length of output: 13898
Update the GolangCI-Lint version in verify-dependencies.yml to v2.12.2. verify-replace-run runs dependent repositories’ verify-dependencies targets, which invoke lint-go-code and use this installed binary.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-build.yml at line 28, Update the GolangCI-Lint version
used by the CI dependency verification workflow to v2.12.2, ensuring the
configuration consumed by verify-dependencies and its verify-replace-run flow
installs that exact version for lint-go-code.
|



update to golangci-lint 2.12.2 and remove the obsolete
skip-pkg-cacheandskip-build-cache(because the cache related to Go itself is already handled byactions/setup-go)Signed-off-by: Xavier Coulon xcoulon@redhat.com
Summary by CodeRabbit