-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
numfmt: add --invalid option #4249
Conversation
6429e21
to
6203822
Compare
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.
Nice! I think the error handling can be cleaned up a bit using some of the functions in uucore
. Could you look into that?
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.
See above
Not sure what's causing these failures, it's all passing locally and the failing components are not numfmt :) |
Yeah the GNU tests are a bit flaky. No need to worry about it if it's not concerning the util you changed :) |
59fddc5
to
53ca5e7
Compare
Probably done now, the remaining test failure is not related to this PR :) |
53ca5e7
to
b17fda5
Compare
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.
Looking good! A few more small comments.
e9f42cb
to
f9c83b3
Compare
9a5f90e
to
9664e3e
Compare
I'd forgotten about this PR, I'll have a look at what's causing the failures :) |
e26c764
to
969738c
Compare
@sylvestre @tertsdiepraam CI tests are passing again, except for the android thing which doesn't look to be related to this PR :) The GNU tests related to --invalid are still failing, but they're now failing due to the error message provided not matching instead of the exit code not matching, so that's some kind of improvement. Fixing those error messages (e.g. |
GNU testsuite comparison:
|
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.
I agree this can be merged once Sylvestre's suggestion has been applied!
Co-authored-by: Sylvestre Ledru <[email protected]>
GNU testsuite comparison:
|
Thanks for your PR :) |
* numfmt: add invalid option * numfmt: return code 0 if ignore or warn * numfmt: implement all --invalid modes * numfmt: validate stdout and stderr * numfmt: remove unnecessary code * numfmt: apply formatting * numfmt: fix clippy issues * numfmt: fix failing test cases * numfmt: fix formatting * numfmt: fix bug when handling broken pipe * numfmt: fix bug where extra newline was added * numfmt: add test cases for edge cases * numfmt: simplify error handling * numfmt: remove redundant if * numfmt: add newline between functions * numfmt: fix failing test cases * numfmt: add support for arg numbers using --invalid * numfmt: simplify error handling in value handlers * numfmt: fix merge conflict and align prints * numfmt: fix clippy suggestion * numfmt: replace "valid" with "invalid" in tests * numfmt: move INVALID to respect alph. order * numfmt: move printlns outside of match to avoid duplication Co-authored-by: Sylvestre Ledru <[email protected]> * numfmt: remove empty line --------- Co-authored-by: Daniel Hofstetter <[email protected]> Co-authored-by: Sylvestre Ledru <[email protected]>
Implements the --invalid option from issue #1280.