Re: [PATCH] add a trivial patch style checker



On 29/05/2007, at 18:12, Joel Schopp wrote:

+ if(!($prevline=~/\/\*\*/) && length($lineforcounting) > 80){
Actually, I think this should be "> 79" (after stripping a .diff's
control column), since the cursor may move to the 81th column when
editing an 80-col line - which is what we want to avoid, no?
80 tends to work for me because of that "if on 80 then don't wrap until
there is another character" behaviour of most terminals. Anyone else
with a firm opinion.

I think 80 is good. What the specific number is does not matter much, we all have screens wider than 80 characters. The point is just to have a number that prevents really long lines and prevents people from indenting too many levels past our minds ability to keep up. We've already all been coding to 80, and it happens to be a nice round number we can all remember and love. The only reason I see to select 79 is that prime numbers are generally cooler than other numbers.

We do have screens wider than 80 characters, but almost all the time I spend in terminal windows, they are set to 24x80 (the default size). It is a matter of habit, and I bet I'm not alone. Hence, 80 is "annoying" not only because patches will wrap, but also because in some editors the 80th character will also wrap.

Just my 2 cents,

--
Julio M. Merino Vidal <jmerino@xxxxxxxxxx>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Logic failure..
    ... > I've been writting a HTML parser and ran into pretty much ... > single buffer and scanning the text 1 character at a time. ... I need to find me a good point to wrap".. ... I end up with extra <url tags> as resizing events occur and ...
    (borland.public.delphi.non-technical)
  • Re: nobr html command
    ... Mozilla gets it right, IE is broken. ... IE seems to be using the pipe character "|" as whitespace, ... allowing text to wrap at a hyphen.) ... navigation is fixed modify the nav bar in a text ...
    (microsoft.public.frontpage.programming)
  • Re: Text Format
    ... Vertical Alignment to Top for those cells? ... > G'Day Mates, ... > the text would wrap up one line. ... What is the character I can type or what ...
    (microsoft.public.mac.office.excel)
  • Re: Wrapping strings
    ... >I have a string containing multiple lines that I would like to put ... >I'd like to wrap each line by the 78th character. ...
    (comp.lang.ruby)
  • Text Format
    ... row 1 and formatted> vertical> bottom> wrap text. ... If I type Sales 2004, ... the text would wrap up one line. ... What is the character I can type or what ...
    (microsoft.public.mac.office.excel)