From 27d44c1abd676a8db2cb92f231e2bc4cc89370da Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 30 Jun 2025 15:55:50 +0100 Subject: BaseTools/PatchCheck.py: drop redundant line count check Before doing the subject line length check, the script checks that the number of lines in the commit message (including subject) is not less than or equal to zero - and returns if it is. However, then the test for whether the subject line starts with a CVE tag inexplicably also checks for whether the number of lines are greater than or equal to one. This is just clutter, so drop it. Signed-off-by: Leif Lindholm --- BaseTools/Scripts/PatchCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Scripts/PatchCheck.py') diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 5b611e0..2b76707 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -263,7 +263,7 @@ class CommitMessageCheck: self.error('Empty commit message!') return - if count >= 1 and re.search(self.cve_re, lines[0]): + if re.search(self.cve_re, lines[0]): # # If CVE-xxxx-xxxxx is present in subject line, then limit length of # subject line to 92 characters -- cgit v1.1