summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2022-03-16 13:52:20 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-04-04 15:18:31 +0000
commitf16b05a13bb3a4c685c4c6161c1367e43fcd61f7 (patch)
tree8db0b3d0a4d35676dafbd8770afd2e99699c6099
parent3e130e40fc55f06f7fe019e87ed9bae957870a12 (diff)
downloadedk2-f16b05a13bb3a4c685c4c6161c1367e43fcd61f7.zip
edk2-f16b05a13bb3a4c685c4c6161c1367e43fcd61f7.tar.gz
edk2-f16b05a13bb3a4c685c4c6161c1367e43fcd61f7.tar.bz2
.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>
-rw-r--r--.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
index 82db7a5..6920580 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]:
"""