I’m not 100% sure if this is what you are looking for but astyle has a max-code-length option you can use. It does the job for me.
http://astyle.sourceforge.net/astyle.html#_max-code-length Regards, Furkan Üzümcü On Jan 18, 2019, 17:53 -0500, rol...@logikalsolutions.com, wrote: > Thanks for the feedback gentleman. > > I was unaware Artistic Style is dead. Haven't found a line length > thing in it anyway. I am using Artistic Style for formatting because > the default QtCreator coding style and a project level .astylerc of > this: > > # If you have astyle installed on your Linux development machine and > # you have enabled it via Beautifier plug-in then this file will control > # how the beautifier formats the code. > > --style=allman > --indent=spaces=4 > --add-braces > --convert-tabs > --keep-one-line-statements > > along with a keyboard shortcut of <ALT><Shift><F> gets me the bulk of > the way there. I have to manually view the ruler and fix which is fine > since I'm merging multiple "test" projects into something usable, but, > the "official" requirement states "an automated tool." Might see if we > can get overrides for that. > > Quoting Matthew Woehlke <mwoehlke.fl...@gmail.com>: > > > 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 > > > -- > Roland Hughes, President > Logikal Solutions > (630) 205-1593 > > http://www.theminimumyouneedtoknow.com > http://www.infiniteexposure.net > http://www.johnsmith-book.com > http://www.logikalblog.com > http://www.interestingauthors.com/blog > http://lesedi.us > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest