aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-11-09 14:40:34 +0100
committerMartin Liska <mliska@suse.cz>2022-11-11 09:52:22 +0100
commit999c14cf249758b75e0ecf5acfab209aa5974d96 (patch)
tree175f55abd25fd39d8f4d2eb86deb8f64a1a2973e /contrib/gcc-changelog/git_commit.py
parent5576518a5667ad826937125a19b7c59c34d8733c (diff)
downloadgcc-999c14cf249758b75e0ecf5acfab209aa5974d96.zip
gcc-999c14cf249758b75e0ecf5acfab209aa5974d96.tar.gz
gcc-999c14cf249758b75e0ecf5acfab209aa5974d96.tar.bz2
changelog: check for space after tab
contrib/ChangeLog: * gcc-changelog/git_commit.py: Check for a space after leading tab. * gcc-changelog/test_email.py: Likewise. * gcc-changelog/test_patches.txt: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 1f6e192..3bd6710 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -365,6 +365,7 @@ class GitCommit:
self.check_for_broken_parentheses()
self.deduce_changelog_locations()
self.check_file_patterns()
+ self.check_line_start()
if not self.errors:
self.check_mentioned_files()
self.check_for_correct_changelog()
@@ -613,6 +614,13 @@ class GitCommit:
msg = 'bad parentheses wrapping'
self.errors.append(Error(msg, entry.parentheses_stack[-1]))
+ def check_line_start(self):
+ for entry in self.changelog_entries:
+ for line in entry.lines:
+ if line.startswith('\t '):
+ msg = 'extra space after tab'
+ self.errors.append(Error(msg, line))
+
def get_file_changelog_location(self, changelog_file):
for file in self.info.modified_files:
if file[0] == changelog_file: