NO-JIRA: Fix staticcheck warnings in pkg/cli/admin/mustgather#2306
NO-JIRA: Fix staticcheck warnings in pkg/cli/admin/mustgather#2306ankimaha-sys wants to merge 1 commit into
Conversation
Address several staticcheck findings in the must-gather package: - Remove unnecessary fmt.Sprintf calls wrapping plain strings (S1039) - Eliminate unused make() allocation overwritten on next line (SA4006) - Use time.Since instead of time.Now().Sub (S1012) - Remove redundant return at end of function (S1023) Signed-off-by: Ankit Mahajan ankimaha@redhat.com Signed-off-by: Ankit Mahajan <ankimaha@redhat.com>
|
@ankimaha-sys: This pull request explicitly references no jira issue. 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. |
|
Hi @ankimaha-sys. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughMinor refactors in must-gather CLI code replace ChangesMust-gather cleanups
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ 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 |
|
/ok-to-test |
|
@ankimaha-sys: 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. |
|
Thanks! /lgtm |
|
/verified by CI |
|
@tchap: This PR has been marked as verified by 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ankimaha-sys, tchap 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 |
Description
Address several staticcheck findings in the must-gather package:
fmt.Sprintfcalls wrapping plain strings (S1039)make()allocation overwritten on next line (SA4006)time.Sinceinstead oftime.Now().Sub(S1012)Changes
mustgather.go: Remove two instances offmt.Sprintfwith no format verbs, consolidate variable declaration to avoid wasted allocation, remove trailingreturnsummary.go: Replacetime.Now().Sub(x)with idiomatictime.Since(x), removefmt.Sprintfwith no format verbsAll changes are mechanical and do not alter runtime behavior.
Made with Cursor
Summary by CodeRabbit
Bug Fixes
Chores