public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V1 0/1] UncrustifyCheck ignore file list paths reduction
@ 2022-06-06 19:52 Kun Qin
  2022-06-06 19:52 ` [PATCH V1 1/1] .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path Kun Qin
  0 siblings, 1 reply; 3+ messages in thread
From: Kun Qin @ 2022-06-06 19:52 UTC (permalink / raw)
  To: devel; +Cc: Sean Brogan, Bret Barkelew, Michael D Kinney, Liming Gao

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

When UncrustifyCheck plugin checks against "IgnoreFiles" tag, the script
references the files relative to the workspace.

This will require all files listed under such category to specify the
package name in the corresponding package CI YAML file.

To resolve this issue, the ignore files' paths are changed to be based on
the applicable package path.

Patch v1 branch: https://github.com/kuqin12/edk2/pull/new/uncrustify_ignore_pkg

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>


Kun Qin (1):
  .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package
    path

 .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.35.1.windows.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V1 1/1] .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path
  2022-06-06 19:52 [PATCH V1 0/1] UncrustifyCheck ignore file list paths reduction Kun Qin
@ 2022-06-06 19:52 ` Kun Qin
  2022-06-06 19:55   ` Michael Kubacki
  0 siblings, 1 reply; 3+ messages in thread
From: Kun Qin @ 2022-06-06 19:52 UTC (permalink / raw)
  To: devel
  Cc: Sean Brogan, Bret Barkelew, Michael D Kinney, Liming Gao,
	Michael Kubacki

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

`IgnoreFiles` tag is specified in the CI YAML files in each individual
packages. The current logic for UncrustifyCheck script bases specified
file paths from workspace, which requires the package name to be included
in each entry.

This change updates the ignore checking logic to be based on current
package path in order to reduce redundancy. It also keeps the consistency
of `IgnoreFiles` field other pytools such as SpellCheck and EccCheck.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
 .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
index 00d78864656f..8dc9ffe6945a 100644
--- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
+++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
@@ -290,7 +290,7 @@ class UncrustifyCheck(ICiBuildPlugin):
         # This information is only used for reporting (not used here) and
         # the ignore lines are being passed directly as they are given to
         # this plugin.
-        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_workspace_path)
+        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_package_path)
 
     def _get_git_ignored_paths(self) -> List[str]:
         """"
-- 
2.35.1.windows.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V1 1/1] .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path
  2022-06-06 19:52 ` [PATCH V1 1/1] .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path Kun Qin
@ 2022-06-06 19:55   ` Michael Kubacki
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Kubacki @ 2022-06-06 19:55 UTC (permalink / raw)
  To: Kun Qin, devel; +Cc: Sean Brogan, Bret Barkelew, Michael D Kinney, Liming Gao

Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>

On 6/6/2022 3:52 PM, Kun Qin wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3942
> 
> `IgnoreFiles` tag is specified in the CI YAML files in each individual
> packages. The current logic for UncrustifyCheck script bases specified
> file paths from workspace, which requires the package name to be included
> in each entry.
> 
> This change updates the ignore checking logic to be based on current
> package path in order to reduce redundancy. It also keeps the consistency
> of `IgnoreFiles` field other pytools such as SpellCheck and EccCheck.
> 
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Michael Kubacki <mikuback@linux.microsoft.com>
> 
> Signed-off-by: Kun Qin <kuqin12@gmail.com>
> ---
>   .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
> index 00d78864656f..8dc9ffe6945a 100644
> --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
> +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
> @@ -290,7 +290,7 @@ class UncrustifyCheck(ICiBuildPlugin):
>           # This information is only used for reporting (not used here) and
>           # the ignore lines are being passed directly as they are given to
>           # this plugin.
> -        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_workspace_path)
> +        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_package_path)
>   
>       def _get_git_ignored_paths(self) -> List[str]:
>           """"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-06 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-06 19:52 [PATCH V1 0/1] UncrustifyCheck ignore file list paths reduction Kun Qin
2022-06-06 19:52 ` [PATCH V1 1/1] .pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path Kun Qin
2022-06-06 19:55   ` Michael Kubacki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox