Conversation
3a9dcef to
25c587f
Compare
aaf9314 to
e2d10e3
Compare
There was a problem hiding this comment.
Is .any? and ! .empty? identical performance wise? I was under the impression the latter was more performant (although that could be a Railism, creeping in)
There was a problem hiding this comment.
Could stick each . on a new line if refactoring here anyway?
There was a problem hiding this comment.
if/else is a bit more readable here.
There was a problem hiding this comment.
Make a block if for a shorter line
There was a problem hiding this comment.
stick the .join on a new line?
There was a problem hiding this comment.
next unless args to shorten the line (and maybe a few variables)
There was a problem hiding this comment.
unless block form for a shorter line
There was a problem hiding this comment.
These feel a bit weird. Maybe return a Hash?
There was a problem hiding this comment.
A Hash cannot be destructed as nicely. Eventually this should be used like this:
remote_formulae, remote_casks = search_taps(query)There was a problem hiding this comment.
@reitermarkus I think given they are arrays a {formulae: [], casks: []} is a nicer interface for the consumer. It's not obvious from the naming that search_taps provides two arrays of arrays as results.
84e1390 to
6d9aa3b
Compare
There was a problem hiding this comment.
I know this code isn't directly part of this refactor, but may it make sense to make it more closely match the above syntax? Any thoughts @MikeMcQuaid?
There was a problem hiding this comment.
@GauthamGoli, do we even need this? We are using OptionParser only to parse arguments and not to display descriptions.
There was a problem hiding this comment.
@GauthamGoli Given we're not using descriptions anywhere yet I'd be 👍 in deleting the description code until it's used (or using it in some places now)
There was a problem hiding this comment.
👍 For removal if it's not being utilized.
There was a problem hiding this comment.
It seems from #4271 (comment) it will be used very shortly so let's leave it as-is for now.
There was a problem hiding this comment.
Sorry. I missed this notification. Yeah. I'll be working on this shortly, don't remove it.
0ad6111 to
3f8f1e3
Compare
52eb3da to
f41d105
Compare
|
Thanks again @reitermarkus! 🚢 when ready. |
e17e5e3 to
bce52e2
Compare
bce52e2 to
cc93997
Compare
|
👍 Good work, @reitermarkus |
brew stylewith your changes locally?brew testswith your changes locally?Refactor
searchto useCLI::Parser.