utils: checkstyle.py: Treat Malformed trailers as a CommitIssue
If a Malformed trailer is identified the checkstyle script triggers a RuntimeError and stops processing the rest of the commit. A malformed trailer can be regarded as an issue in the commit and reported as such using the same method as other faults identified by the tool. Convert the RuntimeError into a CommitIssue and continue processing other trailers. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
668a5e674a
commit
b14d2cab12
1 changed files with 2 additions and 1 deletions
|
@ -479,7 +479,8 @@ class TrailersChecker(CommitChecker):
|
|||
for trailer in commit.trailers:
|
||||
match = TrailersChecker.trailer_regex.fullmatch(trailer)
|
||||
if not match:
|
||||
raise RuntimeError(f"Malformed commit trailer '{trailer}'")
|
||||
issues.append(CommitIssue(f"Malformed commit trailer '{trailer}'"))
|
||||
continue
|
||||
|
||||
key, value = match.groups()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue