]> git.proxmox.com Git - mirror_edk2.git/commitdiff
.pytool: UncrustifyCheck: Set IgnoreFiles path relative to package path
authorKun Qin <kuqin12@gmail.com>
Mon, 6 Jun 2022 19:24:54 +0000 (12:24 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Jun 2022 01:53:24 +0000 (01:53 +0000)
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>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py

index 00d78864656f40c1f004af0b422c50b3c042ac82..8dc9ffe6945af0430d23cce30555d5a6982169a3 100644 (file)
@@ -290,7 +290,7 @@ class UncrustifyCheck(ICiBuildPlugin):
         # This information is only used for reporting (not used here) and\r
         # the ignore lines are being passed directly as they are given to\r
         # this plugin.\r
-        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_workspace_path)\r
+        return parse_gitignore_lines(ignored_files, "Package configuration file", self._abs_package_path)\r
 \r
     def _get_git_ignored_paths(self) -> List[str]:\r
         """"\r