On Aug 8, 2013, at 12:50 PM, Mark Thomas wrote:

> Currently, Tomcat has an 'guide' of a maximum of 80 characters for line
> length. It has been a while since we reviewed this and as we are looking
> at style rules...
> 
> As a starting point what do folks think of the following options:
> 
> Line length:
> 80 - the current
> 100 -
> 120 -

I'm for 120. Every single other OSS project I work on is 120. Tomcat is the 
only thing that's less.

> Strictness
> Informal - the current
> Enforce  - Use checkstyle to enforce whatever limit is chosen

I'm for enforcing. That's another place Tomcat is different from other OSS I 
work on. The current informal policy is actually more of a pain than I thought 
it would be. Instead of having a hard rule you know you can depend on, you 
never know whether someone is going to complain about a line or two being to 
long in a patch. Often, it varies depending on which committer reviews the 
patch.

> Pros for longer lines:
> - code easier to read
> 
> Cons
> - diffs may wrap in mail clients

I hope nobody is still reading mail at 800x600. ;-)

> - harder to work with code in a pure text interface (particularly if
> that interface is limited in width to 80 chars)

True, but FYI, if I open a terminal window on my Mac or on any of the Linux 
distros I use, the width defaults to 140-180 characters. Plenty.

Nick

> Comment
> - With increasing screen resolution I expect IDEs to manage widths upto
> 120 or possibly even more
> - Few (any?) folks will ever need to work in a pure text UI where the
> line length is limited
> - My only concern is readability of diffs
> 
> I have no strong preference on line length but if we do opt for a longer
> length I'd like to see checkstyle enforce the limit.
> 
> Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to