From 2855334986808d9f3286eb4f0686c9857703864f Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Wed, 21 Oct 2020 15:57:15 +0530 Subject: [PATCH] ci: improve rules for commitlint Add few more rules, like: * subject cannot be empty * body shouldn't be empty * avoid body line length over 80 characters (warning only) * always sign-off the commit msg Signed-off-by: Prasanna Kumar Kalever --- .commitlintrc.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.commitlintrc.yml b/.commitlintrc.yml index cc5a9b208..08e87f9d8 100644 --- a/.commitlintrc.yml +++ b/.commitlintrc.yml @@ -9,8 +9,21 @@ rules: header-max-length: [2, always, 72] # the subject may not end with a "." header-full-stop: [2, never, "."] + + # the subject cannot be empty + subject-empty: [2, never] + # we do not use scopes for commit messages scope-empty: [1, always] + + # Body shouldn't be empty + body-min-length: [2, always, 1] + # Wrap the lines to 80 characters. + body-max-line-length: [1, always, 80] + + # always sign off the commit + signed-off-by: [2, always, "Signed-off-by:"] + # valid types/prefixes, see docs/development-guide.md type-enum: - 2