From: Michael Kubacki Date: Wed, 16 Mar 2022 17:52:20 +0000 (-0400) Subject: .pytool/Plugin/UncrustifyCheck: Update func to return absolute paths X-Git-Tag: edk2-stable202205~171 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f16b05a13bb3a4c685c4c6161c1367e43fcd61f7;p=mirror_edk2.git .pytool/Plugin/UncrustifyCheck: Update func to return absolute paths Currently, UncrustifyCheck._get_git_ignored_paths() is documented to return a list of absolute file paths but it currently returns a list of relative file paths. This change updates the function to return a list of absolute file paths. The result is later compared to the list of absolute file paths for files to run against Uncrustify. Cc: Michael D Kinney Cc: Liming Gao Cc: Sean Brogan Cc: Bret Barkelew Signed-off-by: Michael Kubacki Reviewed-by: Michael D Kinney Reviewed-by: Jiewen Yao --- diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py index 82db7a5a43..6920580646 100644 --- a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py +++ b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py @@ -292,7 +292,12 @@ class UncrustifyCheck(ICiBuildPlugin): f"An error occurred reading git ignore settings. This will prevent Uncrustify from running against the expected set of files.") # Note: This will potentially be a large list, but at least sorted - return outstream_buffer.getvalue().strip().splitlines() + rel_paths = outstream_buffer.getvalue().strip().splitlines() + abs_paths = [] + for path in rel_paths: + abs_paths.append( + os.path.normpath(os.path.join(self._abs_workspace_path, path))) + return abs_paths def _get_git_submodule_paths(self) -> List[str]: """