[edk2-devel] 回复: [PATCH v2 1/1] Pytool: SpellCheck: Defer path expansion in cspell parameters

gaoliming gaoliming at byosoft.com.cn
Thu Jun 17 01:45:51 UTC 2021


Reviewed-by: Liming Gao <gaoliming at byosoft.com.cn>

> -----邮件原件-----
> 发件人: Kun Qin <kuqin12 at gmail.com>
> 发送时间: 2021年6月16日 0:54
> 收件人: 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>;
> Bret Barkelew <bret.barkelew at microsoft.com>
> 主题: [PATCH v2 1/1] Pytool: SpellCheck: Defer path expansion in cspell
> parameters
> 
> From: Sean Brogan <sean.brogan at microsoft.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3454
> 
> On Linux the shell expands the wildcard paths and causes multiple files
> to be missed. This change adds additional quotes to defer expansion in
> order to bring parity in cspell result.
> 
> 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>
> Signed-off-by: Kun Qin <kuqin12 at gmail.com>
> Reviewed-by: Sean Brogan <sean.brogan at microsoft.com>
> Reviewed-by: Bret Barkelew <bret.barkelew at microsoft.com>
> ---
> 
> Notes:
>     v2:
>     - Added reviewed-by tags [Bret]
>     - Added reviewed-by tag [Sean]
>     - Added signed-off-by tag from Kun [Sean]
> 
>  .pytool/Plugin/SpellCheck/SpellCheck.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/.pytool/Plugin/SpellCheck/SpellCheck.py
> b/.pytool/Plugin/SpellCheck/SpellCheck.py
> index 9ad57632a6e8..05c471d91ba1 100644
> --- a/.pytool/Plugin/SpellCheck/SpellCheck.py
> +++ b/.pytool/Plugin/SpellCheck/SpellCheck.py
> @@ -134,7 +134,8 @@ class SpellCheck(ICiBuildPlugin):
>          #
>          relpath = os.path.relpath(abs_pkg_path)
>          cpsell_paths = " ".join(
> -            [f"{relpath}/**/{x}" for x in
> package_relative_paths_to_spell_check])
> +            # Double quote each path to defer expansion to cspell
> parameters
> +            [f'"{relpath}/**/{x}"' for x in
> package_relative_paths_to_spell_check])
> 
>          # Make the config file
>          config_file_path = os.path.join(
> --
> 2.31.1.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76636): https://edk2.groups.io/g/devel/message/76636
Mute This Topic: https://groups.io/mt/83595825/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