R – Industry spread code formatting tools

code formattingcoding-style

What are the tools that are most used in the industry for formatting source code, C++ in particular, so to obtain a style consistency of the whole code base? Possibly tools that would allow the user to select which style to apply (e.g. BSD, GNU, etc…)?

I could not find many references on the web to solid, wide-spread tools for such a thing, maybe companies that use these tools build theirs in-house?

Best Answer

I am yet to see a special tool beyond what your IDE (throw in a small set of standard plug-ins to that) offers you for formatting source code. Of course, there can be organizations that are there that do use them.

You seem to be influenced by the indent tool. Alas, most organizations tend to have their own formatting standards which may/may not relate to one of the styles you mention. They may more suitably be represented by a custom .indent file.