CNF-23397: Upgrade golangci-lint from v1.64.8 to v2.11.4#576
CNF-23397: Upgrade golangci-lint from v1.64.8 to v2.11.4#576sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
e8a3495 to
a1cba07
Compare
|
The new linter requires some code changes. |
a1cba07 to
e789919
Compare
|
I've fixed the linter failures by updating the
The |
|
I'd prefer to fix the linter issues first then update the linter version. |
|
So I've been messing with |
| - unused | ||
| linters-settings: | ||
| errcheck: | ||
| exclude: .errcheck_excludes.txt |
There was a problem hiding this comment.
should we remove that file?
e789919 to
be7d6f9
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughMigrate golangci-lint config to v2 format and enable/configure v2 linters; bump golangci-lint version in Makefile; remove an unused test helper from pkg/runutil/runutil_test.go. Changesgolangci-lint configuration
Test cleanup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 the current code and only fix it if needed.
Inline comments:
In @.golangci.yml:
- Around line 9-16: Unify the errcheck exclusions by either adding the
vendor-path logger exclusion
(github.com/openshift/telemeter/vendor/github.com/go-kit/log.Logger).Log to the
existing errcheck exclusions block (the same place that lists
(github.com/go-kit/log.Logger).Log and other Close/Fprintf entries) or remove
the legacy errcheck exclusions file so there’s a single source of truth; ensure
the exact vendor-path symbol is present in the exclusions to match the
vendorized import.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1fab9657-ab63-47c4-9253-41c43affa581
📒 Files selected for processing (3)
.golangci.ymlMakefilepkg/runutil/runutil_test.go
💤 Files with no reviewable changes (1)
- pkg/runutil/runutil_test.go
be7d6f9 to
4c38ed4
Compare
|
@sebrandon1: This pull request references CNF-23397 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
- Update GOLANGCI_LINT_VERSION from v1.64.8 to v2.0.2 - Migrate .golangci.yml to v2 format: - Add version: "2" declaration - Move linters-settings under linters.settings Tracking: redhat-best-practices-for-k8s/telco-bot#49
4c38ed4 to
bf1f6eb
Compare
|
@sebrandon1: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
.golangci.ymlto v2 formatChanges Made
Test plan
Tracking: redhat-best-practices-for-k8s/telco-bot#49
Summary by CodeRabbit
Chores
Tests