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

Joe Perches
2012-02-09T22:09:21Z

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.