From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2D4D92117D740 for ; Tue, 23 Oct 2018 05:35:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 05:35:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="94304894" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 23 Oct 2018 05:35:18 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 23 Oct 2018 05:35:19 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 23 Oct 2018 05:35:18 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.84]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.21]) with mapi id 14.03.0319.002; Tue, 23 Oct 2018 20:35:17 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Chen, Hesheng" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] BaseTools/Ecc: Update a checkpoint criteria. Thread-Index: AQHUZSnHX8e8rs2IpkqaXrd1UVuJUqUsz1xw Date: Tue, 23 Oct 2018 12:35:16 +0000 Message-ID: References: <1539678308-14596-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1539678308-14596-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools/Ecc: Update a checkpoint criteria. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 12:35:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Tuesday, October 16, 2018 4:25 PM To: edk2-devel@lists.01.org Cc: Chen, Hesheng Subject: [edk2] [PATCH] BaseTools/Ecc: Update a checkpoint criteria. From: Hess Chen Change the criteria of the checkpoint of "#ifndef" to remove the requiremen= t of prefix '_'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen --- BaseTools/Source/Python/Ecc/Check.py | 2 +- BaseTools/Source/Python/Ecc/EccToolError.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python= /Ecc/Check.py index fc86ad96f2..3bf86b42cd 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1374,7 +1374,7 @@ class Check(object): RecordSet =3D EccGlobalData.gDb.TblFile.Exec(SqlCommand) for Record in RecordSet: Name =3D Record[1].replace('#ifndef', '').strip() - if Name[0] !=3D '_' or Name[-1] !=3D '_': + if Name[-1] !=3D '_': if not EccGlobalData.gException.IsException(ERROR_NAMI= NG_CONVENTION_CHECK_IFNDEF_STATEMENT, Name): EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CO= NVENTION_CHECK_IFNDEF_STATEMENT, OtherMsg=3D"The #ifndef name [%s] does not= follow the rules" % (Name), BelongsToTable=3DFileTable, BelongsToItem=3DRe= cord[0]) =20 diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source= /Python/Ecc/EccToolError.py index ae0a31af8a..e327a7888d 100644 --- a/BaseTools/Source/Python/Ecc/EccToolError.py +++ b/BaseTools/Source/Python/Ecc/EccToolError.py @@ -167,7 +167,7 @@ gEccErrorMessage =3D { ERROR_NAMING_CONVENTION_CHECK_ALL : "", ERROR_NAMING_CONVENTION_CHECK_DEFINE_STATEMENT : "Only capital letters= are allowed to be used for #define declarations", ERROR_NAMING_CONVENTION_CHECK_TYPEDEF_STATEMENT : "Only capital letter= s are allowed to be used for typedef declarations", - ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT : "The #ifndef at the s= tart of an include file should use both prefix and postfix underscore chara= cters, '_'", + ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT : "The #ifndef at the s= tart of an include file should use a postfix underscore characters, '_'", ERROR_NAMING_CONVENTION_CHECK_PATH_NAME : """Path name does not follow= the rules: 1. First character should be upper case 2. Must contain lower c= ase characters 3. No white space characters""", ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME : """Variable name does no= t follow the rules: 1. First character should be upper case 2. Must contain= lower case characters 3. No white space characters 4. Global variable name= must start with a 'g'""", ERROR_NAMING_CONVENTION_CHECK_FUNCTION_NAME : """Function name does no= t follow the rules: 1. First character should be upper case 2. Must contain= lower case characters 3. No white space characters""", --=20 2.14.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel