-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Emit warnings for mistyped options #1860
Comments
Why can't we use this, instead of implementing a new DSL for parsing options? |
@GauthamGoli We could use that but it wouldn't solve the problem by itself. The issue is that |
the way it is now, those are hardcoded, can we extract them into a yaml, and try to apply fuzzy search first ? i feel like this will prove slow |
@Qchmqs Rather than a YAML we'd use a command DSL but yes, this might enable fuzzy search. |
Another simple solution could be to create an A command/arg DSL would of course solve this problem, but this would be a rather large refactoring and there are about 500 call sites that use that global variable |
@lwe Agreed that the command/arg DSL would be the longer-term solution; I think that's probably the best thing to push towards at this point. |
There's no work-in-progress on this at #2420. |
Uh, yes. I meant "now". Sorry. |
@apjanke: Don't worry, it's cool. We all make typographical mistakes at some time or another. (Now, back to lurking…) |
This is done 🎉! Thanks to @GauthamGoli for the vast majority of the hard work here and designing such great APIs to use 👏 |
Popping in from Homebrew retirement since I was still subscribed to the issue to say: congratulations @GauthamGoli – what an amazing achievement. I didn't think this issue would ever be solved, and it looks like it did indeed take a huge amount of work. Wonderful stuff. |
Hear, hear! This is a big win, IMHO. Congratulations @GauthamGoli! I've tried out the new changes and it's already caught me out for inadvertently using a bogus option on one of my own formulae. Thanks for getting this in! |
e.g.
brew cleanup --hlep
should refuse to run rather than silently ignoring the--hlep
argument. This will likely require implementing a new DSL for Homebrew commands that lists all the possible arguments (where currently justARGV.include?
is used).The text was updated successfully, but these errors were encountered: