From 0bbec15b549032f239f0b05a725598f719d74325 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Sun, 18 Feb 2024 12:59:50 -0800 Subject: BaseTools/Scripts/PatchCheck: Error if no Cc tags are present REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4694 If no Cc tags are detected in a commit message, then generate an error. All patches sent for review are required to provide the set of maintainers and reviewers responsible for the directories/files modified. The set of maintainers and reviewers are documented in Maintainers.txt and can be retrieved using the script BaseTools/Scripts/GetMaintainer.py. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Cc: Michael Kubacki Signed-off-by: Michael D Kinney Reviewed-by: Michael Kubacki Reviewed-by: Rebecca Cran --- BaseTools/Scripts/PatchCheck.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 158a2b30a5..415198e382 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -229,8 +229,10 @@ class CommitMessageCheck: ) def check_misc_signatures(self): - for sig in self.sig_types: - self.find_signatures(sig) + for sigtype in self.sig_types: + sigs = self.find_signatures(sigtype) + if sigtype == 'Cc' and len(sigs) == 0: + self.error('No Cc: tags for maintainers/reviewers found!') cve_re = re.compile('CVE-[0-9]{4}-[0-9]{5}[^0-9]') -- cgit v1.2.3