From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933072AbdKFTYM (ORCPT ); Mon, 6 Nov 2017 14:24:12 -0500 Received: from smtprelay0110.hostedemail.com ([216.40.44.110]:53292 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932576AbdKFTYL (ORCPT ); Mon, 6 Nov 2017 14:24:11 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:421:541:599:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:2196:2197:2199:2200:2393:2559:2562:2691:2692:2736:2828:3138:3139:3140:3141:3142:3354:3622:3653:3865:3866:3867:3868:3870:3871:3873:4250:4321:4385:4605:4823:5007:6119:7875:7903:7974:9040:10004:10400:10848:11232:11658:11914:12043:12295:12296:12740:12760:12895:13161:13229:13439:14180:14181:14659:14721:21060:21080:21221:21324:21325:21451:21627:30054:30062:30069: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: bite18_24227284f8418 X-Filterd-Recvd-Size: 3122 Message-ID: <1509996246.2431.54.camel@perches.com> Subject: Re: [PATCH] get_maintainer: Add a couple more --self-test options From: Joe Perches To: Tom Saeger Cc: Andrew Morton , linux-kernel@vger.kernel.org Date: Mon, 06 Nov 2017 11:24:06 -0800 In-Reply-To: <20171106191242.fbcsf5br2kohtpu3@revenge.us.oracle.com> References: <3409f30c5a419cc4265c47551bbf341b744cbda6.1509989188.git.joe@perches.com> <20171106191242.fbcsf5br2kohtpu3@revenge.us.oracle.com> 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 Mon, 2017-11-06 at 13:12 -0600, Tom Saeger wrote: > Hi Joe, > This is good! I had something similar cooking - specifically for SCM validation. > > My SCM attempt caught a few more issues: > - check git branch if specified > - check validitiy of "T:" entry, otherwise warn of malformed entry. > > Example malformed (current next has two instances): > > 9740 T: git://git.infradead.org/nvme.git > > Should be: > 9740 T: git git://git.infradead.org/nvme.git > > > Also - I believe you intended on warning on all bad SCM entries, not just newly discovered ones? > Your change correctly finds a previously $isbad, however the print is enclosed in an else preventing output. > > I was going to inline these, but in my haste to understand in incorporate changes I sanitized whitespace > (BTW - I see both tabs and spaces, which is preferred in this file?) The indent in get_maintainers is supposed to be 4. There is a mix of 8 char tabs and spaces, but there shouldn't be any spaces followed by tabs. > The below git branch special-casing is for these: > 567:T: git git://people.freedesktop.org/~airlied/linux (part of drm maint) > 3671:T: git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates) > > See bottom for my suggestions. [] > Changed SCM portion to this, which picks up a few more warnings... > Checks git branch on remote if specified. > Perhaps a $ismalformed category or some other way to deal with malformed entries? Or just > move up to first check of SCM? > > ## SCM reachability > } elsif (($type eq "T") && ($self_test eq "" || $self_test =~ /\bscm\b/)) { > next if (grep(m@^\Q$value\E$@, @good_links)); > my $isbad = 0; > if (grep(m@^\Q$value\E$@, @bad_links)) { > $isbad = 1; > } else { > if ($value !~ /^(?:git|quilt|hg)\s+\S/) { > print("$x->{file}:$x->{linenr}: warning: malformed entry\t$x->{line}\n"); > } elsif ($value =~ /^git\s+(\S+)(\s+([^\(]+\S+))?/) { This seems OK. > my $url = $1; > my $branch = ""; > $branch = $3 if $3; >