We would like to be able to reformat C++ blocks/functions of code directly from the Visual Studio IDE, so that developers easily can assure that the new code they insert adheres to our formatting guidelines.

I have found the Artistic Style tool, which pretty much covers the features we'd need. However, it only can work on whole files from the CLI, so it's not very helpful for what we'd want to use it. (Whole file reformatting is certainly never what we want [a].)

Visual Studio (2005) has limited auto-format features, but AFAICS, these are mostly about correct indenting, which is a bit lacking.

So my question is if there are any tools that can do advanced reformatting on a selection from the VS IDE, or maybe if there's a VS IDE plugin making use of AStyle?

Edit: The question linked to recommends a tool - ProFactor's StyleManager - are there any other tools like this?

Note [a] : Reformatting whole files or whole project trees is only useful for personal projects or for initial code checkins, IMHO. For a (large) team project, blanket reformatting will mess up the change history of files or lines within files, making it a lot harder to track who's changed what.

Edit
Report