Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758392Ab2BIWJV (ORCPT ); Thu, 9 Feb 2012 17:09:21 -0500 Received: from perches-mx.perches.com ([206.117.179.246]:34437 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753588Ab2BIWJU (ORCPT ); Thu, 9 Feb 2012 17:09:20 -0500 Message-ID: <1328825357.29329.16.camel@joe2Laptop> Subject: Re: [PATCH] SubmittingPatches: Increase the line length limit from 80 to 100 colums From: Joe Perches To: Jan Engelhardt , Andy Whitcroft Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , Cyrill Gorcunov , Linux Kernel Mailing List , Pavel Emelyanov , Serge Hallyn , KAMEZAWA Hiroyuki , Kees Cook , Tejun Heo , "H. Peter Anvin" Date: Thu, 09 Feb 2012 14:09:17 -0800 In-Reply-To: References: <20120130140905.441199885@openvz.org> <20120130141852.309402052@openvz.org> <20120203074656.GC30543@elte.hu> <20120203083530.GD1968@moon> <20120203090929.GA23996@elte.hu> <20120203012241.bcd3d0c8.akpm@linux-foundation.org> <20120203095227.GA13162@elte.hu <20120203100743.GA3334@elte.hu> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1070 Lines: 29 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/