rustfmt
rustfmt copied to clipboard
Add a options "--ignore-error", ignore errors and just print back the input
Because of this
@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)
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
I see, thanks for clarifying. Marking this as a feature request