diff --git a/common/scripts/lint-commits b/common/scripts/lint-commits index 6aea99d5115..f4bb47c8f9f 100755 --- a/common/scripts/lint-commits +++ b/common/scripts/lint-commits @@ -32,9 +32,16 @@ do awk -vC="$cmt" ' # skip header /^$/ && !msg { msg = 1; next } + /^author .*noreply/ && !msg { + print "::error title=Commit Lint::" C ": authored by noreply email"; + ret=1; + } !msg { next } # 3: long-line-is-banned-except-footnote-like-this-for-url - (NF > 2) && (length > 80) { print "::error title=Commit Lint::" C ": long line: " $0; exit 1 } + (NF > 2) && (length > 80) { + print "::error title=Commit Lint::" C ": long line: " $0 + ret = 1 + } !subject { if (length > 50) { print "::warning title=Commit Lint::" C ": subject is a bit long" } if (!($0 ~ ":" || $0 ~ "^Take over maintainership " || $0 ~ "^Orphan ")) { print "::error title=Commit Lint::" C ": subject does not follow CONTRIBUTING.md guildelines"; exit 1 } @@ -45,7 +52,11 @@ do subject = 1; next } /^$/ { body = 1; next } - !body { print "::error title=Commit Lint::" C ": second line must be blank"; exit 1 } + !body { + print "::error title=Commit Lint::" C ": second line must be blank" + ret = 1 + } + END { exit ret } ' || status=1 done exit $status