From: Michael Kubacki <michael.kuba...@microsoft.com>

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.kin...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Sean Brogan <sean.bro...@microsoft.com>
Cc: Bret Barkelew <bret.barke...@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kuba...@microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com>
Reviewed-by: Jiewen Yao <jiewen....@intel.com>
---
 .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py 
b/.pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py
index 82db7a5a438b..6920580646de 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]:
         """
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#88359): https://edk2.groups.io/g/devel/message/88359
Mute This Topic: https://groups.io/mt/90190226/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to