I use astyle to format my code most of the time, and I love it, but one annoyance is that it can't specify at least a "hint" for max line length. If you have a line of code like:
this->mButtonCancel->setLeftClickProc(boost::bind(&FileListDialog::cancelLeftClick, this));
I would like a source code formatter to be able to wrap it even moderately intelligently:
this->mButtonCancel->setLeftClickProc(
boost::bind(&FileListDialog::cancelLeftClick, this));
...is probably how I would format that line of code. For long argument lists, I would probably prefer to align on the open parenthesis, but clearly that won't work in this situation. Either way, astyle doesn't support doing anything with long lines that don't contain multiple statements. Does anyone know of a tool that does?
GNU Indent has support for breaking long lines.
http://www.gnu.org/software/indent/manual/indent.html#SEC12
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With