[Patch 10/12] StandaloneMmPkg: Update YAML to ignore specific ECC files/errors


Michael D Kinney
 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3749

Update package YAML files to ignore ECC errors that are
already present. These issues must be fixed in the future,
but should not block source code changes for these known
issues.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
StandaloneMmPkg/StandaloneMmPkg.ci.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/StandaloneMmPkg/StandaloneMmPkg.ci.yaml b/StandaloneMmPkg/StandaloneMmPkg.ci.yaml
index 06bef683cdaf..4777532a7ede 100644
--- a/StandaloneMmPkg/StandaloneMmPkg.ci.yaml
+++ b/StandaloneMmPkg/StandaloneMmPkg.ci.yaml
@@ -5,6 +5,18 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
{
+ "EccCheck": {
+ ## Exception sample looks like below:
+ ## "ExceptionList": [
+ ## "<ErrorID>", "<KeyWord>"
+ ## ]
+ "ExceptionList": [
+ "4002", "HobConstructor"
+ ],
+ ## Both file path and directory path are accepted.
+ "IgnoreFiles": [
+ ]
+ },
## options defined .pytool/Plugin/CompilerPlugin
"CompilerPlugin": {
"DscPath": "StandaloneMmPkg.dsc"
--
2.32.0.windows.1


Sami Mujawar
 

Hi Mike,


On 23/11/2021 09:21 PM, Michael D Kinney wrote:
+ "EccCheck": {
+ ## Exception sample looks like below:
+ ## "ExceptionList": [
+ ## "<ErrorID>", "<KeyWord>"
+ ## ]
+ "ExceptionList": [
+ "4002", "HobConstructor"
+ ],
I noticed there are other ECC errors with ID 4002 in StandaloneMmPkg.

e.g.

edk2\StandaloneMmPkg\Library\StandaloneMmCoreHobLib\Arm\StandaloneMmCoreHobLib.c(24): [4002]Function header doesn't exist Function [CreateHob] has NO comment immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmCoreHobLib\Arm\StandaloneMmCoreHobLibInternal.c(24): [4002]Function header doesn't exist Function [HobConstructor] has NO comment immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmHobLib\StandaloneMmHobLib.c(247): [4002]Function header doesn't exist Function [CreateHob] has NO comment immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmPeCoffExtraActionLib\AArch64\StandaloneMmPeCoffExtraActionLib.c(26): [4002]Function header doesn't exist Function [UpdatePeCoffPermissions] has NO comment immediately preceding it.

I am trying to undestand how the ExceptionList works. Would Keyword = HobConstructor ignore the other errors too?

We will look into getting these issues fixed. However, to unblock this patch can proceed.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar


Michael D Kinney
 

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sami Mujawar
Sent: Wednesday, November 24, 2021 2:55 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@intel.com>; Supreeth Venkatesh
<supreeth.venkatesh@arm.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Liming
Gao <gaoliming@byosoft.com.cn>; Michael Kubacki <michael.kubacki@microsoft.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [Patch 10/12] StandaloneMmPkg: Update YAML to ignore specific ECC files/errors

Hi Mike,


On 23/11/2021 09:21 PM, Michael D Kinney wrote:
+ "EccCheck": {
+ ## Exception sample looks like below:
+ ## "ExceptionList": [
+ ## "<ErrorID>", "<KeyWord>"
+ ## ]
+ "ExceptionList": [
+ "4002", "HobConstructor"
+ ],
I noticed there are other ECC errors with ID 4002 in StandaloneMmPkg.

e.g.

edk2\StandaloneMmPkg\Library\StandaloneMmCoreHobLib\Arm\StandaloneMmCoreHobLib.c(24):
[4002]Function header doesn't exist Function [CreateHob] has NO comment
immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmCoreHobLib\Arm\StandaloneMmCoreHobLibInternal.c(24):
[4002]Function header doesn't exist Function [HobConstructor] has NO
comment immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmHobLib\StandaloneMmHobLib.c(247):
[4002]Function header doesn't exist Function [CreateHob] has NO comment
immediately preceding it.
edk2\StandaloneMmPkg\Library\StandaloneMmPeCoffExtraActionLib\AArch64\StandaloneMmPeCoffExtraActionLib.c(26):
[4002]Function header doesn't exist Function [UpdatePeCoffPermissions]
has NO comment immediately preceding it.

I am trying to undestand how the ExceptionList works. Would Keyword =
HobConstructor ignore the other errors too?
Good question. EccCheck in EDK II CI only checks lines of files that have been
added or changed. So if these lines were not modified by uncrustify, then they
would not block the commit, even if they have ECC issues.


We will look into getting these issues fixed. However, to unblock this
patch can proceed.
Thank you. Yes. That is the intention here. Temporarily use YAML file
to get EccCheck to pass, then the work with package owners to update code
so these exceptions can be removed.


Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar