mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 00:52:44 +00:00
ci(lintcommit): allow UPPER_CASE first word (#22245)
This commit is contained in:
@@ -128,10 +128,10 @@ local function validate_commit(commit_message)
|
|||||||
return [[There should only be one whitespace after the colon.]]
|
return [[There should only be one whitespace after the colon.]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check that first character after space isn't uppercase.
|
-- Allow lowercase or ALL_UPPER but not Titlecase.
|
||||||
if string.match(after_colon:sub(2,2), '%u') then
|
if after_colon:match(' *%u%l') then
|
||||||
return [[First character should not be uppercase.]]
|
return [[Description should not be Capitalized.]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check that description isn't just whitespaces
|
-- Check that description isn't just whitespaces
|
||||||
if vim.trim(after_colon) == "" then
|
if vim.trim(after_colon) == "" then
|
||||||
@@ -231,7 +231,8 @@ function M._test()
|
|||||||
['refactor(): empty scope'] = false,
|
['refactor(): empty scope'] = false,
|
||||||
['ci( ): whitespace as scope'] = false,
|
['ci( ): whitespace as scope'] = false,
|
||||||
['ci: period at end of sentence.'] = 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,
|
['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,
|
['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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user