Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upseparate rust-format or rustfmt tool that does the pretty-printing #648
Comments
steveklabnik
referenced this issue
Jan 21, 2015
Closed
separate rust-format or rustfmt tool that does the pretty-printing #3195
steveklabnik
added
the
A-wishlist
label
Jan 21, 2015
This comment has been minimized.
This comment has been minimized.
EdorianDark
commented
Jan 27, 2015
|
A seperate binary to format source code files would be cool. |
This comment has been minimized.
This comment has been minimized.
RomanTsegelskyi
commented
May 15, 2015
|
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? |
This comment has been minimized.
This comment has been minimized.
dinfuehr
commented
May 15, 2015
|
Yes, there is someone working on this: https://github.com/nrc/rustfmt/commits/master |
This comment has been minimized.
This comment has been minimized.
|
@RomanTsegelskyi nrc/rustfmt is very usable and has lots to do, contributions very welcome: a list of good first issues to tackle |
alexcrichton
added
the
T-dev-tools
label
May 18, 2015
alexcrichton
added
the
P-high
label
May 26, 2015
brson
closed this
Jun 23, 2016
This comment has been minimized.
This comment has been minimized.
|
rustfmt is well on its way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
steveklabnik commentedJan 21, 2015
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?