Skip to content
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 #648

Closed
steveklabnik opened this issue Jan 21, 2015 · 5 comments
Closed
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.

Comments

@steveklabnik
Copy link
Member

Issue by dbp
Tuesday Aug 14, 2012 at 03:28 GMT

For earlier discussion, see rust-lang/rust#3195

This issue was labelled with: A-an-interesting-project, A-build, A-driver, A-frontend, A-pretty, I-enhancement, metabug, P-high in the Rust repository


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?

@EdorianDark
Copy link

A seperate binary to format source code files would be cool.
The name rustformat sounds more rusty.

@RomanTsegelskyi
Copy link

Is anyone working on this? I know about rustfmt, but it seems to be a dead project. Would it be reasonable to rewrite it after 1.0 release?

@dinfuehr
Copy link

Yes, there is someone working on this: https://github.com/nrc/rustfmt/commits/master

@nrc
Copy link
Member

nrc commented May 15, 2015

@RomanTsegelskyi nrc/rustfmt is very usable and has lots to do, contributions very welcome: a list of good first issues to tackle

@alexcrichton alexcrichton added the T-dev-tools Relevant to the development tools team, which will review and decide on the RFC. label May 18, 2015
@brson brson closed this as completed Jun 23, 2016
@brson
Copy link
Contributor

brson commented Jun 23, 2016

rustfmt is well on its way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-dev-tools Relevant to the development tools team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

7 participants