summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@oss.qualcomm.com>2025-06-10 13:18:07 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-06-25 16:22:25 +0000
commitc44efa0fbd393c47756bed8708c47650a23218ac (patch)
tree26b204a4a9297ad14694a9ec05e7d8656d4bb672
parenta2e20bc4b0dc4f88105d304dd99479fd4f1eaac0 (diff)
downloadedk2-c44efa0fbd393c47756bed8708c47650a23218ac.zip
edk2-c44efa0fbd393c47756bed8708c47650a23218ac.tar.gz
edk2-c44efa0fbd393c47756bed8708c47650a23218ac.tar.bz2
BaseTools/PatchCheck.py: pass list of packages to CommitMessageCheck
In order to enable subject line format compliance checking in following patches, pass through a list of modified packages to CommitMessageCheck. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
-rwxr-xr-xBaseTools/Scripts/PatchCheck.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 551e0b4..47c2b03 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -97,7 +97,7 @@ class EmailAddressCheck:
class CommitMessageCheck:
"""Checks the contents of a git commit message."""
- def __init__(self, subject, message, author_email):
+ def __init__(self, subject, message, author_email, updated_packages):
self.ok = True
self.ignore_multi_package = False
@@ -561,14 +561,14 @@ class CheckOnePatch:
patch content.
"""
- def __init__(self, name, patch):
+ def __init__(self, name, patch, updated_packages=None):
self.patch = patch
self.find_patch_pieces()
email_check = EmailAddressCheck(self.author_email, 'Author')
email_ok = email_check.ok
- msg_check = CommitMessageCheck(self.commit_subject, self.commit_msg, self.author_email)
+ msg_check = CommitMessageCheck(self.commit_subject, self.commit_msg, self.author_email, updated_packages)
msg_ok = msg_check.ok
self.ignore_multi_package = msg_check.ignore_multi_package
@@ -695,7 +695,8 @@ class CheckGitCommits:
email = self.read_committer_email_address_from_git(commit)
self.ok &= EmailAddressCheck(email, 'Committer').ok
patch = self.read_patch_from_git(commit)
- check_patch = CheckOnePatch(commit, patch)
+ updated_packages = self.get_parent_packages (dec_files, commit, 'ADM')
+ check_patch = CheckOnePatch(commit, patch, updated_packages)
self.ok &= check_patch.ok
ignore_multi_package = check_patch.ignore_multi_package
if PatchCheckConf.ignore_multi_package: