In my company's coding convention, we format nested namespaces on one line. For example:
namespace Foo { namespace Bar {
...
}} // Foo::Bar
I am trying to enforce this style using astyle but could not find anything in the documentation at http://astyle.sourceforge.net/astyle.html
When I run the following astyle command (ignore the irrelevant options)
astyle --style=allman --add-brackets --align-reference=name --align-pointer=name --attach-namespaces --pad-header --pad-oper --unpad-paren -n <filename>
I end up with each of the nested namespace on a separate line as shown below:
namespace Foo {
namespace Bar {
...
}
}