Re: [PATCH] SubmittingPatches: Increase the line length limit from80 to 100 colums

From: Joe Perches
Date: Thu Feb 09 2012 - 17:09:49 EST


On Thu, 2012-02-09 at 22:55 +0100, Jan Engelhardt wrote:
> I am throwing in the suggestion to augment checkpatch
> such that it does not look at whether single lines are over $limit, but
> whether a certain percentage of lines of a file is over $limit. That,
> together with a badness value that is e.g. following some power law to
> the amount of chars too much, but not when the line cannot be broken
> in the first place. Maybe along the lines of
>
> #perlish#
> foreach (<>) {
> /^\s+\S+/;
> if (length($_) > length($&)) {
> push @candidate, $_;
> $badness += (length($_) - length($&)) ** 1.5;
> }
> }
> if ($badness > $threshold) {
> warn about @candidate_lines;
> }

I'd be OK with something like this while making the
current line length check a --strict only option.


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