From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759064AbdKRFVb (ORCPT ); Sat, 18 Nov 2017 00:21:31 -0500 Received: from smtprelay0109.hostedemail.com ([216.40.44.109]:44640 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758782AbdKRFV0 (ORCPT ); Sat, 18 Nov 2017 00:21:26 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:421:541:599:800:960:967:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2890:3138:3139:3140:3141:3142:3353:3622:3653:3865:3866:3867:3868:3870:3871:3872:3874:4042:4250:4321:5007:10004:10249:10400:10848:11232:11658:11914:12043:12555:12740:12760:12895:12986:13069:13311:13357:13439:14181:14659:14721:14764:21080:21450:21451:21627:30001:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: neck50_464c5d544ae35 X-Filterd-Recvd-Size: 2142 Message-ID: <1510982478.31022.3.camel@perches.com> Subject: Re: [PATCH] checkpatch: allow URL >80 chars From: Joe Perches To: Andreas Brauchli , Andy Whitcroft Cc: linux-kernel@vger.kernel.org Date: Fri, 17 Nov 2017 21:21:18 -0800 In-Reply-To: <1510934219.2407.4.camel@elementarea.net> References: <1510934219.2407.4.camel@elementarea.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-11-17 at 16:56 +0100, Andreas Brauchli wrote: > Allow URL to exceed the 80 char limit for improved interaction in > adaption to ongoing but undocumented practice. > > $ git grep -E '://\S{77}.*' -- '*.[ch]' > > The patch checks that the URL is indeed on its own line in that it > allows a maximal prefix of 4 characters to account for a URL after a > comment (e.g. ' // https://...') > > The URL format allows for up to 5 protocol characters before the > separator :// (e.g. https, git, ...). Additionally, an URL starting > with a "domain.tld" or "subdomain.domain" pattern (e.g. > 'www.kernel.org') is also accepted. > > $rawline is used in the check as comments are removed from $line. > > Signed-off-by: Andreas Brauchli > --- > scripts/checkpatch.pl | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 8b80bac055e4..aed447923354 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2904,6 +2904,11 @@ sub process { > } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) { > $msg_type = ""; > > + # URL (w/ minimal padding e.g. "+ // ") > + } elsif ($rawline =~ /^\+.*?\b((?:\w{1,5}:\/\/|\w+\.\w+)\S+).*$/ && nack. this matches member dereference lines like foo.bar = baz; and include lines like #include