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

Sean spbrogan at outlook.com
Tue Jun 15 15:59:49 UTC 2021


Please update the signed-off-by to include yours.

Reviewed-by: Sean Brogan <sean.brogan at microsoft.com>

Thanks
Sean


On 6/11/2021 10:04 PM, Kun Qin wrote:
> 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>
> ---
>   .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 43365441b91c..97b240ef747c 100644
> --- a/.pytool/Plugin/SpellCheck/SpellCheck.py
> +++ b/.pytool/Plugin/SpellCheck/SpellCheck.py
> @@ -133,7 +133,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(
> 


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