Skip to content

Add a options "--ignore-error", ignore errors and just print back the input #6055

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

Open
Dangerise opened this issue Feb 3, 2024 · 4 comments

Comments

@Dangerise
Copy link

No description provided.

@Dangerise
Copy link
Author

Because of this

@ytmimi
Copy link
Contributor

ytmimi commented Feb 7, 2024

@Dangerised sorry to hear that you're having issues. Some additional information would be very helpful. Most importantly we'll need a test case that can be used to reproduce the issue.

Could you go into a little more detail about what version of rustfmt you're using, if you're using any configuration options, and what editor you're using. This seems like an issue that's popped up before. This wasn't quite the issue I was looking for, but it's what I've managed to track down so far (#5172)

@ytmimi ytmimi added the needs-mcve needs a Minimal Complete and Verifiable Example label Feb 7, 2024
@Dangerise
Copy link
Author

Actually, it's not a bug, but I'm longing for this feature because it will be much better to use with other formatter.

I'm using helix editor, which requires its formatter to read from stdin and print the result to stdout, if formatter return not zero, then the code will keep the same, otherwise the editor will replace the code with stdout from the formatter

In this case, when some code with syntax error was passed to the rustfmt, rustfmt will return 1, and write nothing to stdout, but the stdout will be passed to the next formatter with pipe, then the next formatter read nothing from stdin so it also writes nothing to stdout and returns 0

@ytmimi ytmimi added feature-request and removed needs-mcve needs a Minimal Complete and Verifiable Example labels Feb 7, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Feb 7, 2024

I see, thanks for clarifying. Marking this as a feature request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants