public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: remove the punch card limit
@ 2010-01-06 16:56 Stefani Seibold
  2010-01-07  3:07 ` Miles Bader
  0 siblings, 1 reply; 3+ messages in thread
From: Stefani Seibold @ 2010-01-06 16:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, apw, jschopp, davej

The time of 80 characters punch card and terminals are over, so i would
be a good thing to set the line length limit to 120. Every display today
should be able handle this. And it think it make formated source code
more readable.

For everybody who want know: The 80 column limit of a terminal comes
from the punch cards, which stored exact 80 characters.
  
Signed-off-by: Stefani Seibold <stefani@seibold.net>
---
 checkpatch.pl |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.33-rc2.orig/scripts/checkpatch.pl	2009-12-03 04:51:21.000000000 +0100
+++ linux-2.6.33-rc2.new/scripts/checkpatch.pl	2010-01-06 17:46:40.057565661 +0100
@@ -1374,13 +1374,13 @@ sub process {
 # check we are in a valid source file if not then ignore this hunk
 		next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
 
-#80 column limit
+#120 column limit
 		if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
 		    $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
 		    $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
-		    $length > 80)
+		    $length > 120)
 		{
-			WARN("line over 80 characters\n" . $herecurr);
+			WARN("line over 120 characters\n" . $herecurr);
 		}
 
 # check for adding lines without a newline.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch.pl: remove the punch card limit
  2010-01-06 16:56 [PATCH] checkpatch.pl: remove the punch card limit Stefani Seibold
@ 2010-01-07  3:07 ` Miles Bader
  2010-01-07  7:31   ` Stefani Seibold
  0 siblings, 1 reply; 3+ messages in thread
From: Miles Bader @ 2010-01-07  3:07 UTC (permalink / raw)
  To: Stefani Seibold; +Cc: linux-kernel, Andrew Morton, apw, jschopp, davej

Stefani Seibold <stefani@seibold.net> writes:
> The time of 80 characters punch card and terminals are over, so i would
> be a good thing to set the line length limit to 120. Every display today
> should be able handle this. And it think it make formated source code
> more readable.
>
> For everybody who want know: The 80 column limit of a terminal comes
> from the punch cards, which stored exact 80 characters.

It doesn't really matter where it came from, what matters is whether
people still commonly use 80-column windows or not.

I know people that only ever use one (huuuge) full-screen editor window
with small fonts, and can happily view lines that are 300 characters
long (of course, the right 80% of that window is almost always
completely blank...).

In my case, I use 80-column windows because (1) it allows me to have two
editor/terminal windows side-by-side with a reasonable font-size on a
typical display, (2) it reduces the amount of wasted blank space in
editor/terminal windows that you'd have if you made your windows really
wide just for the very occasional wide line, and (3) it's, well,
standard, or at least as much of a standard as we have, which is useful
when interacting with other people.

Anyway, I think the vague consensus seems to be that it's OK to go over
80 chars in many cases, but that it may be an indicator that some
refactoring is in order....

-Miles

-- 
80% of success is just showing up.  --Woody Allen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] checkpatch.pl: remove the punch card limit
  2010-01-07  3:07 ` Miles Bader
@ 2010-01-07  7:31   ` Stefani Seibold
  0 siblings, 0 replies; 3+ messages in thread
From: Stefani Seibold @ 2010-01-07  7:31 UTC (permalink / raw)
  To: Miles Bader; +Cc: linux-kernel, Andrew Morton, apw, jschopp, davej

Am Donnerstag, den 07.01.2010, 12:07 +0900 schrieb Miles Bader:
> Stefani Seibold <stefani@seibold.net> writes:
> > The time of 80 characters punch card and terminals are over, so i would
> > be a good thing to set the line length limit to 120. Every display today
> > should be able handle this. And it think it make formated source code
> > more readable.
> 
> Anyway, I think the vague consensus seems to be that it's OK to go over
> 80 chars in many cases, but that it may be an indicator that some
> refactoring is in order....

That's why i didn't removed the check. 120 character should be good, it
should be not an indicator for refactoring. Especial with tab width of
8.

Stefani



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-07  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 16:56 [PATCH] checkpatch.pl: remove the punch card limit Stefani Seibold
2010-01-07  3:07 ` Miles Bader
2010-01-07  7:31   ` Stefani Seibold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox