-
Notifications
You must be signed in to change notification settings - Fork 113
Fix cross-platform help command and improve diff messages #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -170,7 +170,7 @@ func runReviewWithOptions(opts reviewopts.Options) error { | |||||
| return fmt.Errorf("failed to collect diff for vouch: %w", diffErr) | ||||||
| } | ||||||
| if len(diffContent) == 0 { | ||||||
| return fmt.Errorf("no diff content to vouch for") | ||||||
| return fmt.Errorf("%s", noDiffMessage(opts.DiffSource)) | ||||||
|
||||||
| return fmt.Errorf("%s", noDiffMessage(opts.DiffSource)) | |
| return errors.New(noDiffMessage(opts.DiffSource)) |
Copilot
AI
Apr 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: fmt.Errorf("%s", noDiffMessage(...)) can be simplified to errors.New(noDiffMessage(...)) to avoid a formatting-only fmt.Errorf call.
| return fmt.Errorf("%s", noDiffMessage(opts.DiffSource)) | |
| return errors.New(noDiffMessage(opts.DiffSource)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says the override writes help output using
fmt.Fprint, but the implementation delegates tocli.HelpPrinterCustom(which already writes toio.Writer). Update the comment to match what the code actually does to avoid misleading future readers.