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.136; helo=mga12.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 A7A2A21B02822 for ; Fri, 1 Feb 2019 17:14:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 17:14:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,550,1539673200"; d="scan'208";a="316993180" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2019 17:14:19 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 17:14:19 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 1 Feb 2019 17:14:19 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by shsmsx102.ccr.corp.intel.com ([169.254.2.207]) with mapi id 14.03.0415.000; Sat, 2 Feb 2019 09:14:17 +0800 From: "Feng, Bob C" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: "Chen, Hess" Thread-Topic: [edk2] [PATCH] BaseTools/ECC: Add a new type of exception Thread-Index: AQHUuHjgIgPPubURG0ugBH48jjbvl6XLuABA Date: Sat, 2 Feb 2019 01:14:17 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16007D5C8@SHSMSX101.ccr.corp.intel.com> References: <20190130084918.18728-1-bob.c.feng@intel.com> In-Reply-To: <20190130084918.18728-1-bob.c.feng@intel.com> Accept-Language: zh-CN, 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: Add a new type of exception 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: Sat, 02 Feb 2019 01:14:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Feng= , Bob C Sent: Wednesday, January 30, 2019 4:49 PM To: edk2-devel@lists.01.org Cc: Chen, Hess Subject: [edk2] [PATCH] BaseTools/ECC: Add a new type of exception From: Hess Chen Add a new type of exception for function body checkpoint. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen --- BaseTools/Source/Python/Ecc/c.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc= /c.py index b8d6adde16..577d92744c 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -1,7 +1,7 @@ ## @file # This file is used to be the c coding style checking of ECC tool # -# Co= pyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2019, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompani= es this distribution. The full text of the license may be found at @@ -151= 1,7 +1511,7 @@ def CheckFuncLayoutBody(FullFileName): =20 FileTable =3D 'Identifier' + str(FileID) Db =3D GetDB() - SqlStatement =3D """ select BodyStartColumn, EndColumn, ID + SqlStatement =3D """ select BodyStartColumn, EndColumn, ID, Name from Function where BelongsToFile =3D %d """ % (FileID) @@ -1520,9 +1520,15 @@ def CheckFuncLayoutBody(FullFileName): return ErrorMsgList for Result in ResultSet: if Result[0] !=3D 0: - PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'op= en brace should be at the very beginning of a line.', 'Function', Result[2]= ) + if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_L= AYOUT_CHECK_FUNCTION_BODY, Result[3]): + PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, + 'The open brace should be at the very beginn= ing of a line for the function [%s].' % Result[3], + 'Function', Result[2]) if Result[1] !=3D 0: - PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'cl= ose brace should be at the very beginning of a line.', 'Function', Result[2= ]) + if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_L= AYOUT_CHECK_FUNCTION_BODY, Result[3]): + PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, + 'The close brace should be at the very begin= ning of a line for the function [%s].' % Result[3], + 'Function', Result[2]) =20 def CheckFuncLayoutLocalVariable(FullFileName): ErrorMsgList =3D [] -- 2.14.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel