-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
separate rust-format or rustfmt tool that does the pretty-printing #3195
Comments
I would prefer it to be a separate tool. |
Yeah, this is going to move out to a separate tool a la |
Note: this is a relative bug of #2238 |
nominating for backwards-compatible milestone |
if possible, I'd prefer to retain the option (perhaps with -Z) to print out the |
Marking as a metabug and collecting in dependencies: #751 #850 #2951 #5181 |
What's the status of this? |
The pretty printer becomes more and more broken as time goes on. @MaikKlein was working on a separate |
@cmr I was using pretty printer for the formating. But I realized it was pretty broken. It often didn't even parse legit code. I wanted to do some work to improve the pretty printer but I had no time. |
cc me |
@pcwalton has a repo relevant to this https://github.com/pcwalton/rustfmt |
+1 for this. Feels pretty essential these days with clang-format (great!) and gofmt (so-so) setting standards. |
What's the status of this? |
The status is the same. Would love to have it, don't have one yet. |
@steveklabnik Is there any official style guide? |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#648 |
Dependency upgrade resulting from `cargo update`. Co-authored-by: tautschnig <1144736+tautschnig@users.noreply.github.com>
It would be really nice to have the pretty printer be good enough to use it as a code formatter, ala gofmt. It still has some issues (I've been working on it), but it is reasonably close to being usable in that way.
But, the commandline invocation is kind of unwieldy (and feels redundant). It seems like --pretty should just pretty print, and other stuff should be handled secondarily, ie with:
--pretty-expanded
--pretty-typed
--pretty-expanded-identified
--pretty-identified
Alternatively, perhaps it would make more sense to actually split it into a separate binary, called rustfmt (or, in longer-keyword land, rustformat).
Thoughts?
The text was updated successfully, but these errors were encountered: