From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jordan.l.justen@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Fri, 05 Apr 2019 00:00:06 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 00:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,310,1549958400"; d="scan'208";a="146785071" Received: from bkbrooks-mobl.amr.corp.intel.com (HELO localhost) ([10.255.230.254]) by FMSMGA003.fm.intel.com with ESMTP; 05 Apr 2019 00:00:02 -0700 MIME-Version: 1.0 In-Reply-To: <20190404224301.11360-1-michael.d.kinney@intel.com> References: <20190404224301.11360-1-michael.d.kinney@intel.com> Cc: Bob Feng , Liming Gao , Yonghong Zhu Subject: Re: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if Contributed under found From: "Jordan Justen" To: Michael D Kinney , devel@edk2.groups.io Message-ID: <155444760210.10097.13545174738753536535@jljusten-skl> User-Agent: alot/0.8 Date: Fri, 05 Apr 2019 00:00:02 -0700 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2019-04-04 15:43:01, Michael D Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1655 >=20 > With the change to BSD+Patent License, the TianoCore Contributor's > Agreement has been removed and as a result, a Contributed under > tag is no longer appropriate in patches. Remove the check for > the TianoCore Contributor's Agreement and instead, generate an > error if a patch contains a Contributed under tag in the commit > message. >=20 > Cc: Jordan Justen > Cc: Bob Feng > Cc: Liming Gao > Cc: Yonghong Zhu > Signed-off-by: Michael D Kinney > --- > BaseTools/Scripts/PatchCheck.py | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) >=20 > diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchChe= ck.py > index 0b580f3b31..19a7159358 100755 > --- a/BaseTools/Scripts/PatchCheck.py > +++ b/BaseTools/Scripts/PatchCheck.py > @@ -1,7 +1,7 @@ > ## @file > # Check a patch for various format issues > # > -# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
> # > # This program and the accompanying materials are licensed and made > # available under the terms and conditions of the BSD License which > @@ -75,13 +75,9 @@ class CommitMessageCheck: > count +=3D 1 > =20 > def check_contributed_under(self): > - cu_msg=3D'Contributed-under: TianoCore Contribution Agreement 1.= 1' > - if self.msg.find(cu_msg) < 0: > - # Allow 1.0 for now while EDK II community transitions to 1.1 > - cu_msg=3D'Contributed-under: TianoCore Contribution Agreemen= t 1.0' > - if self.msg.find(cu_msg) < 0: > - self.error('Missing Contributed-under! (Note: this must = be ' + > - 'added by the code contributor!)') > + if self.msg.find('Contributed-under') >=3D 0: > + self.error('Contributed-under! (Note: this must be ' + > + 'removed by the code contributor!)') I don't think it's too important, but what about something like? contributed_under_re =3D \ re.compile(r'^\s*contributed-under\s*:', re.MULTILINE|re.IGNORECASE) def check_contributed_under(self): mo =3D self.contributed_under_re.search(self.msg) if mo is not None: self.error('Contributed-under! (Note: this must be ' + 'removed by the code contributor!)') * only find 'contributed-under:' at the start of the line * ignore case * adds checking for the ':' * also catches if they put a space before the c-u tag It might let you have 'Contributed-under' in your commit message without triggering the error. :) Like I said, not too important, and either way: Reviewed-by: Jordan Justen