Skip to content

chore: update golangci action - #520

Open
xcoulon wants to merge 1 commit into
masterfrom
update-golangci-action
Open

chore: update golangci action#520
xcoulon wants to merge 1 commit into
masterfrom
update-golangci-action

Conversation

@xcoulon

@xcoulon xcoulon commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

Summary by CodeRabbit

  • Chores
    • Updated the code quality checks to use a newer linting tool version.
    • Improved validation by enabling package and build cache checks.

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>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Walkthrough

The CI workflow now uses GolangCI v2.12.2 and removes the package-cache and build-cache skip options.

Changes

CI lint update

Layer / File(s) Summary
Update GolangCI workflow configuration
.github/workflows/ci-build.yml
The workflow uses GolangCI v2.12.2 instead of v2.1.6. It no longer sets skip-pkg-cache or skip-build-cache.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: ci

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the code changes but omits the required Description and Checks sections and all checklist responses. Add the required template headings and provide answers for each Checks item, including whether make generate was run and whether other projects changed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: updating the GolangCI action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-golangci-action

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the ci Add or update CI/CD configuration label Aug 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 734640c and 62c885a.

📒 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.yml

Repository: 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 || true

Repository: 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.yml

Repository: 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 || true

Repository: 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.

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Add or update CI/CD configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant