-
Notifications
You must be signed in to change notification settings - Fork 277
Add spell correction for CLI options #5461
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
Add spell correction for CLI options #5461
Conversation
For now only basic levenshtein distance (delete,insert,modify). This is probably good enough for the intended use case (suggesting typo fixes on the command line).
This will provide some suggestions if a command line option is unknown, but similar to an option that *does* exist.
f359eab
to
dcca3c5
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5461 +/- ##
===========================================
+ Coverage 68.25% 68.28% +0.02%
===========================================
Files 1180 1183 +3
Lines 97722 97807 +85
===========================================
+ Hits 66698 66783 +85
Misses 31024 31024
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
This is a really cute feature -- we should have this.
src/util/nfa.h
Outdated
/// \file | ||
/// \author Diffblue Ltd. | ||
/// | ||
/// A simple NFA implementation |
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.
Please could you add what it is intended for. There have been other automaton implementations in CPROVER (for SATAbs for example) and I wouldn't like future people to get the wrong idea of what this is.
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.
Good point, will do
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.
While this is a bit of feature creep - it is indeed cute, but also really helpful to new users (and old users that typo :-) ) so I'm happy for it to go in.
This gives you some suggestions if you’ve mistyped a command line parameter.
E.g. on
cbmc --traec
it will suggest--trace
, if you typecbmc --cvc
it will suggest trying--cvc3
or--cvc4
, that sort of thing.