Re: [PATCH] checkpatch.pl: remove the 80 charactes punch card limit

From: David Daney
Date: Wed Jan 27 2010 - 14:01:27 EST


Joel Schopp wrote:

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.
Nack.

While the origins of 80 character lines dates back to punchcards there is a reason it has survived the test of time.

Has it though? If that were the undisputed truth, we wouldn't be having this discussion. Also it is likely that there would be very few devices capable of displaying more than 80 columns.

Lines that go longer are hard to comprehend.

Not universally.

Either they are long themselves, in which case breaking them up into smaller chunks on multiple lines helps readability,

... Or sometimes it results in gibberish.

or they are starting from deep indentation, in which case the function should be refactored or broken up so the logic is more digestable. --

The problem with the checkpatch.pl tool is that its use results in people trying to eliminate warnings. In the case of the 80 column warning, this can result in going against the goal stated in CodingStyle Chapter 2: "Coding style is all about readability and maintainability..."

Perhaps checkpatch.pl needs a third level of diagnostic. Perhaps:

NOTICE: line over 80 characters

Indicating that the line in question should be given extra attention, but weaker than a WARNING.

In any event, it is always fun to discuss these questions of style.


David Daney

--
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/