aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-02-13 12:26:27 -0500
committerGitHub <noreply@github.com>2023-02-13 18:26:27 +0100
commit84cf6a0a7e58aace0e659f2c6bb61d7179164add (patch)
tree86506fd28b3e679d8644f105a287343d467f62c1
parent9de9bd4bedde734e6b795e899e78b5417bc82fe4 (diff)
downloadrneovim-84cf6a0a7e58aace0e659f2c6bb61d7179164add.tar.gz
rneovim-84cf6a0a7e58aace0e659f2c6bb61d7179164add.tar.bz2
rneovim-84cf6a0a7e58aace0e659f2c6bb61d7179164add.zip
ci(lintcommit): allow UPPER_CASE first word (#22245)
-rw-r--r--scripts/lintcommit.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua
index 71796a5e02..977f7e7e46 100644
--- a/scripts/lintcommit.lua
+++ b/scripts/lintcommit.lua
@@ -128,10 +128,10 @@ local function validate_commit(commit_message)
return [[There should only be one whitespace after the colon.]]
end
- -- Check that first character after space isn't uppercase.
- if string.match(after_colon:sub(2,2), '%u') then
- return [[First character should not be uppercase.]]
- end
+ -- Allow lowercase or ALL_UPPER but not Titlecase.
+ if after_colon:match(' *%u%l') then
+ return [[Description should not be Capitalized.]]
+ end
-- Check that description isn't just whitespaces
if vim.trim(after_colon) == "" then
@@ -231,7 +231,8 @@ function M._test()
['refactor(): empty scope'] = false,
['ci( ): whitespace as scope'] = false,
['ci: period at end of sentence.'] = false,
- ['ci: Starting sentence capitalized'] = false,
+ ['ci: Capitalized first word'] = false,
+ ['ci: UPPER_CASE first word'] = true,
['unknown: using unknown type'] = false,
['ci: you\'re saying this commit message just goes on and on and on and on and on and on for way too long?'] = false,
}