diff --git a/.pytool/Plugin/EccCheck/EccCheck.py b/.pytool/Plugin/EccCheck/EccCheck.py index 7235fcb55c..0002143f1a 100644 --- a/.pytool/Plugin/EccCheck/EccCheck.py +++ b/.pytool/Plugin/EccCheck/EccCheck.py @@ -182,6 +182,11 @@ class EccCheck(ICiBuildPlugin): # file_dir = os.path.dirname(file_path[-1]) # + # strip the prefix path till the package name + # + if pkg in file_dir: + file_dir = file_dir[file_dir.find(pkg):] + # # Skip directory names that do not start with the package being scanned. # if file_dir.split('/')[0] != pkg: