On 18/01/2019 13.54, Michael Jackson wrote: > I would think that clang-format should be able to help you out with this. It > is part of the LLVM download.
Ugh... clang-format... Be warned: clang-format's version of line length enforcement is *very* draconian. There is exactly one, and *only* one way to wrap a line (for a given configuration, anyway¹). If you try to wrap a line differently, because it improves readability... that's wrong, and clang-format will "fix" it for you. I can't recommend astyle, since it is basically dead, but please do yourself a favor and also look at uncrustify, which is active and can be configured to be far less rigid than clang-format while still enforcing a line length limit. (¹ Basically, clang-format supports "one item per line", "greedy", and nothing in between². You can choose between them, but only globally, not on a per-case basis.) (² Pedantically, it also supports "leave it alone", but only if you turn off line length enforcement, so that doesn't help you.) -- Matthew _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest