.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 <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Michael Kubacki
2022-03-16 13:52:20 -04:00
committed by mergify[bot]
parent 3e130e40fc
commit f16b05a13b

View File

@ -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.") 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 # 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]: def _get_git_submodule_paths(self) -> List[str]:
""" """