-
Notifications
You must be signed in to change notification settings - Fork 57
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
Skip invalid records #148
Comments
Cool that you're using How do you think the error recovery should work? Let's say the error message looks like this:
Should we parse For the record, for fun I tried to produce the same output as you had, and this worked for me (with a clean
|
Heh, using
I would not "recover" anything :) I haven't looked into rg's code, but I assume you have an iterator somewhere that you use to read multiple records per input stream (like one JSON document per lines). I was thinking of something like |
Ah okay. Right now I'm not convinced it's worth it to add this as an option but if more people request it I'll consider it for sure! |
Sounds good. Thanks for your quick replies, the grep, and the far nicer rq code! :) |
This feature will be great! |
Is there an option, or the plan to add an option, to skip invalid records in a file?
Let's say I want to pipe the output of
cargo rustc --quiet -- --error-format json
torq
to filter and operate on the error messages. Sadly, even with--quiet
, the last few lines will be something likeerror: Could not compile `foo`. […] To learn more, run the command again with --verbose.
. This means I need to save the output to a file and manually edit it before I can use it withrg
.(By the way, I noticed this while generating the list for diesel-rs/diesel#563.)
The text was updated successfully, but these errors were encountered: