From cbe8948cc881fa597996af1cf541a1590765f749 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Wed, 5 Oct 2022 12:15:37 -0700 Subject: [PATCH] gitlint: Fix Co-authored-by handling Prior to this commit, Firecracker's gitlint rules failed any commit message which had any line after the last Co-authored-by tag, including a blank line. This commit ignores blank lines in this case. Signed-off-by: Colin Percival --- tests/framework/gitlint_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/framework/gitlint_rules.py b/tests/framework/gitlint_rules.py index 73c9575ec39..acb36acf9f4 100644 --- a/tests/framework/gitlint_rules.py +++ b/tests/framework/gitlint_rules.py @@ -137,7 +137,7 @@ def rtn(stmt, i): # Checks lines following co-author are only additional co-authors. for i, line in message_iter: - if not line.startswith(co_auth): + if not line.startswith(co_auth) and line.strip(): return rtn( f"Non '{co_auth}' string found after 1st '{co_auth}'", i,