aboutsummaryrefslogtreecommitdiff
path: root/scripts/lintcommit.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-02-16 09:43:05 -0500
committerGitHub <noreply@github.com>2023-02-16 06:43:05 -0800
commit5420bf99988be798938f7ee45b2f993e3c4ff2ee (patch)
treeb983ecfee83394b54a4de51deda72d4130e446de /scripts/lintcommit.lua
parentd34c64e342dfba9248d1055e702d02620a1b31a8 (diff)
downloadrneovim-5420bf99988be798938f7ee45b2f993e3c4ff2ee.tar.gz
rneovim-5420bf99988be798938f7ee45b2f993e3c4ff2ee.tar.bz2
rneovim-5420bf99988be798938f7ee45b2f993e3c4ff2ee.zip
fix(lintcommit): capitalized description #22282
Problem: The "Capitalized" check should only check the first word of a description. Solution: Specify "^".
Diffstat (limited to 'scripts/lintcommit.lua')
-rw-r--r--scripts/lintcommit.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua
index 977f7e7e46..7e08ca4ea0 100644
--- a/scripts/lintcommit.lua
+++ b/scripts/lintcommit.lua
@@ -129,8 +129,8 @@ local function validate_commit(commit_message)
end
-- Allow lowercase or ALL_UPPER but not Titlecase.
- if after_colon:match(' *%u%l') then
- return [[Description should not be Capitalized.]]
+ if after_colon:match('^ *%u%l') then
+ return [[Description first word should not be Capitalized.]]
end
-- Check that description isn't just whitespaces
@@ -232,7 +232,7 @@ function M._test()
['ci( ): whitespace as scope'] = false,
['ci: period at end of sentence.'] = false,
['ci: Capitalized first word'] = false,
- ['ci: UPPER_CASE first word'] = true,
+ ['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,
}