From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mx.groups.io with SMTP id smtpd.web09.2177.1623469774635199801 for ; Fri, 11 Jun 2021 20:49:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C3UBa29q; spf=pass (domain: gmail.com, ip: 209.85.214.178, mailfrom: kuqin12@gmail.com) Received: by mail-pl1-f178.google.com with SMTP id v13so3787871ple.9 for ; Fri, 11 Jun 2021 20:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nTZCXCPFANcTh/AYTPE9Okn11V0ZU16nQQY97b6O9s0=; b=C3UBa29qR0sog8y5jQ6LbQVUO8xB2AK75xZhJE+ZUpAaHvC0IV2ssNmNQoRKmTUWb5 F+zZEMtMl2bI/m/ZxtuEiQiqTftJv8/fnsokDrSVnAjnsm2hB2HURsANU5CZsBJgUsRr VpJXR5byDsfjQ+MsA3EoQp31oBz/sB4+2aG8XZiGn2tzj7RvQGwnX28RTaKCfeTdANva LUdZwHX9ywmTpu+dJnQ7m5yOX2pA+ZAMHOIDeBi3ansMv7d2bMBWHgD81gRP07RNs3yX +rfdTOwujLubVy8bFXKIdP1fC5dQhbxvGDzVqbMCKcOTUsH/P/MgNK58SIMu9pg0YtG8 OVVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nTZCXCPFANcTh/AYTPE9Okn11V0ZU16nQQY97b6O9s0=; b=uc28BRhx+FI3xhRSzX/j9LwWCXlPdeYyxtWHQ8/gmqojYuj589dlvIrO9tppefoZgI nDxnlsBhGef7arlFzBUgfWaCV5xfUevUbYA/8wwvrN6cH/jWDZ99eVOjwk94uxw6Tuvb Rz6btu8s0anrNPYqDU8fpTfFULP6Xj/VfB8sqVGPmpre225DxL3Z5DBVGIAFxygusohq pxLGvlEVap5mglVSGNlCQza7jX0+NIumejoGzYt6k+QPA62lv2BiEdii8+uwb5UMee5c wa2ypohF65iJ6OQjmUkuuQYS9kvj59UWQ4lUxp9LJvDEW7Dt+vhriQ6m2hPhJyuRA3VJ 98Og== X-Gm-Message-State: AOAM533q3dGbRYXzUvD2Trp6pRPJmlaVZOjVIGBAV/1VKhc5CW7elhW1 brJCj3suaLePaWaAtpdzyi8= X-Google-Smtp-Source: ABdhPJx3Iyexjx1+MLIXghHqqZLmi17+Ix2r6K2YOhTNMoM8A39ipzhFpUQ+7Yf2vxoE8VT1Cw++uQ== X-Received: by 2002:a17:90b:4008:: with SMTP id ie8mr7831274pjb.19.1623469774189; Fri, 11 Jun 2021 20:49:34 -0700 (PDT) Return-Path: Received: from [192.168.50.18] ([50.35.88.161]) by smtp.gmail.com with ESMTPSA id u2sm6161850pfg.67.2021.06.11.20.49.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Jun 2021 20:49:33 -0700 (PDT) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCB2MSAxLzFdIFB5dG9vbDogU3BlbGxDaGVjazogRml4IGluY29ycmVjdCBmaWxlIG1hc2sgYWNyb3NzIHBhY2thZ2UgbWF0cmljZXM=?= To: gaoliming , devel@edk2.groups.io Cc: 'Sean Brogan' , 'Bret Barkelew' , 'Michael D Kinney' References: <20210610014733.1267-1-kuqin12@gmail.com> <20210610014733.1267-2-kuqin12@gmail.com> <002601d75e71$24d42fc0$6e7c8f40$@byosoft.com.cn> From: "Kun Qin" Message-ID: <9ce5fabe-dec4-5ca3-e3c8-accbc9a04e28@gmail.com> Date: Fri, 11 Jun 2021 20:49:33 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <002601d75e71$24d42fc0$6e7c8f40$@byosoft.com.cn> Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 > >> -----邮件原件----- >> 发件人: devel@edk2.groups.io 代表 Kun Qin >> 发送时间: 2021年6月10日 9:48 >> 收件人: devel@edk2.groups.io >> 抄送: Sean Brogan ; Bret Barkelew >> ; Michael D Kinney >> ; Liming Gao >> 主题: [edk2-devel] [PATCH v1 1/1] Pytool: SpellCheck: Fix incorrect file > mask >> across package matrices >> >> From: Sean Brogan >> >> 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 >> Cc: Bret Barkelew >> Cc: Michael D Kinney >> Cc: Liming Gao >> >> Signed-off-by: Sean Brogan >> --- >> .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 >> >> >> >> >> > > >