lkml.org 
[lkml]   [2017]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] get_maintainer: Add a couple more --self-test options
From
Date
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;
>

\
 
 \ /
  Last update: 2017-11-08 20:55    [W:0.029 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site