diff options
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-x | contrib/gcc-changelog/git_commit.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 1d0860cddd8..0008865338b 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -155,6 +155,8 @@ pr_regex = re.compile(r'\tPR (?P<component>[a-z+-]+\/)?([0-9]+)$') dr_regex = re.compile(r'\tDR ([0-9]+)$') star_prefix_regex = re.compile(r'\t\*(?P<spaces>\ *)(?P<content>.*)') end_of_location_regex = re.compile(r'[\[<(:]') +item_empty_regex = re.compile(r'\t(\* \S+ )?\(\S+\):\s*$') +item_parenthesis_regex = re.compile(r'\t(\*|\(\S+\):)') LINE_LIMIT = 100 TAB_WIDTH = 8 @@ -490,9 +492,10 @@ class GitCommit: def check_for_empty_description(self): for entry in self.changelog_entries: for i, line in enumerate(entry.lines): - if (star_prefix_regex.match(line) and line.endswith(':') and + if (item_empty_regex.match(line) and (i == len(entry.lines) - 1 - or star_prefix_regex.match(entry.lines[i + 1]))): + or not entry.lines[i+1].strip() + or item_parenthesis_regex.match(entry.lines[i+1]))): msg = 'missing description of a change' self.errors.append(Error(msg, line)) |