There exists one of these built into the Rust compiler, but it's not very good right now. The process of creating an "official" style guide as per the above wiki page might help build the momentum needed to actually make the pretty printer usable.
Re:Quake 3 engine in Rust
by steveklabnik on Friday April 12, 2013 @05:51PM
(#5541277)
Please see my comment upthread about rustc --pretty.
You can't figure out what a pretty printer should pretty print until the style is figured out.
Better than that would be a goftm like tool, that applies the style guide.
People (including me) love that about Go. (I've actually never read a negative comment about it and many possitives).
It puts an end to all issues with formatting, really.
I don't know how reusable the parse is -- it would make something like this even easier.