NO-JIRA: Fix go vet warning in process.go#2304
Conversation
`usageErrorFn` has a printf-style signature (it wraps kcmdutil.UsageErrorf) and expects to perform formatting itself. Passing a pre-formatted fmt.Sprintf string as the format argument is both redundant and unsafe — any literal % characters in parameter names would be misinterpreted as format verbs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Roman Feldman <rofeldma@redhat.com>
|
@rh-roman: 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. |
|
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 (1)
WalkthroughThe duplicate template parameter error handling in RunProcess was changed to pass the format string and arguments directly to usageErrorFn, rather than pre-formatting the message with fmt.Sprintf. The resulting error output remains unchanged. ChangesUsage Error Formatting
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/lgtm |
|
@atiratree: 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 APPROVED This pull-request has been approved by: atiratree, rh-roman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@rh-roman: 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. |
usageErrorFnhas a printf-style signature (it wraps kcmdutil.UsageErrorf)and expects to perform formatting itself. Passing a pre-formatted
fmt.Sprintf string as the format argument is both redundant and unsafe —
any literal % characters in parameter names would be misinterpreted as
format verbs.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Signed-off-by: Roman Feldman rofeldma@redhat.com
Summary by CodeRabbit