回复: 回复: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Fix incorrect file mask across package matrices

gaoliming gaoliming at byosoft.com.cn
Tue Jun 15 07:00:06 UTC 2021


Create PR https://github.com/tianocore/edk2/pull/1713

Thanks
Liming
> -----邮件原件-----
> 发件人: devel at edk2.groups.io <devel at edk2.groups.io> 代表 Kun Qin
> 发送时间: 2021年6月12日 11:50
> 收件人: gaoliming <gaoliming at byosoft.com.cn>; devel at edk2.groups.io
> 抄送: 'Sean Brogan' <sean.brogan at microsoft.com>; 'Bret Barkelew'
> <Bret.Barkelew at microsoft.com>; 'Michael D Kinney'
> <michael.d.kinney at intel.com>
> 主题: Re: 回复: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Fix
incorrect
> file mask across package matrices
> 
> Thanks for the review, Liming. Could you please help merging this patch
> to the master when you have a chance?
> 
> Thanks in advance!
> Kun
> 
> On 06/10/2021 20:23, gaoliming wrote:
> > Reviewed-by: Liming Gao <gaoliming at byosoft.com.cn>
> >
> >> -----邮件原件-----
> >> 发件人: devel at edk2.groups.io <devel at edk2.groups.io> 代表 Kun Qin
> >> 发送时间: 2021年6月10日 9:48
> >> 收件人: devel at edk2.groups.io
> >> 抄送: Sean Brogan <sean.brogan at microsoft.com>; Bret Barkelew
> >> <Bret.Barkelew at microsoft.com>; Michael D Kinney
> >> <michael.d.kinney at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>
> >> 主题: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Fix incorrect
file
> > mask
> >> across package matrices
> >>
> >> From: Sean Brogan <spbrogan at live.com>
> >>
> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3443
> >>
> >> Existing implementation could modify class global data that causes
> >> potential incorrect file mask to be used for execution of plugin.
> >>
> >> This change switches class variable to be tuple so that it cannot be
> >> accidently modified. Local usage of STANDARD_PLUGIN_DEFINED_PATHS
> is
> >> also
> >> changed to copy to new list before modification.
> >>
> >> Cc: Sean Brogan <sean.brogan at microsoft.com>
> >> Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
> >> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> >> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> >>
> >> Signed-off-by: Sean Brogan <sean.brogan at microsoft.com>
> >> ---
> >>   .pytool/Plugin/SpellCheck/SpellCheck.py | 7 ++++---
> >>   1 file changed, 4 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/.pytool/Plugin/SpellCheck/SpellCheck.py
> >> b/.pytool/Plugin/SpellCheck/SpellCheck.py
> >> index 43365441b91c..9ad57632a6e8 100644
> >> --- a/.pytool/Plugin/SpellCheck/SpellCheck.py
> >> +++ b/.pytool/Plugin/SpellCheck/SpellCheck.py
> >> @@ -37,12 +37,12 @@ class SpellCheck(ICiBuildPlugin):
> >>       #
> >>       # A package can remove any of these using IgnoreStandardPaths
> >>       #
> >> -    STANDARD_PLUGIN_DEFINED_PATHS = ["*.c", "*.h",
> >> +    STANDARD_PLUGIN_DEFINED_PATHS = ("*.c", "*.h",
> >>                                        "*.nasm", "*.asm",
> "*.masm",
> >> "*.s",
> >>                                        "*.asl",
> >>                                        "*.dsc", "*.dec", "*.fdf",
> >> "*.inf",
> >>                                        "*.md", "*.txt"
> >> -                                     ]
> >> +                                     )
> >>
> >>       def GetTestName(self, packagename: str, environment: VarDict) ->
> >> tuple:
> >>           """ Provide the testcase name and classname for use in
> reporting
> >> @@ -107,7 +107,8 @@ class SpellCheck(ICiBuildPlugin):
> >>           version_aggregator.GetVersionAggregator().ReportVersion(
> >>               "CSpell", cspell_version,
> >> version_aggregator.VersionTypes.INFO)
> >>
> >> -        package_relative_paths_to_spell_check =
> >> SpellCheck.STANDARD_PLUGIN_DEFINED_PATHS
> >> +        # copy the default as a list
> >> +        package_relative_paths_to_spell_check =
> >> list(SpellCheck.STANDARD_PLUGIN_DEFINED_PATHS)
> >>
> >>           #
> >>           # Allow the ci.yaml to remove any of the above standard
> paths
> >> --
> >> 2.31.1.windows.1
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76502): https://edk2.groups.io/g/devel/message/76502
Mute This Topic: https://groups.io/mt/83550595/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list