diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-26 05:08:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 05:08:15 +0800 |
commit | 9dc09a4cdde9fad4e7861b9467276260bd9b82a9 (patch) | |
tree | 89badb656df7e35d60e7af0e72fe3dceff7baad2 /scripts/lintcommit.lua | |
parent | 9e436251de0329b1479365ff162d87ef18d6d14c (diff) | |
download | rneovim-9dc09a4cdde9fad4e7861b9467276260bd9b82a9.tar.gz rneovim-9dc09a4cdde9fad4e7861b9467276260bd9b82a9.tar.bz2 rneovim-9dc09a4cdde9fad4e7861b9467276260bd9b82a9.zip |
ci(lintcommit): allow capitalized letter after colon in description (#29480)
Diffstat (limited to 'scripts/lintcommit.lua')
-rw-r--r-- | scripts/lintcommit.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua index f0e2feaab3..7cb57de901 100644 --- a/scripts/lintcommit.lua +++ b/scripts/lintcommit.lua @@ -68,11 +68,12 @@ local function validate_commit(commit_message) if after_idx > vim.tbl_count(commit_split) then return [[Commit message does not include colons.]] end - local after_colon = '' + local after_colon_split = {} while after_idx <= vim.tbl_count(commit_split) do - after_colon = after_colon .. commit_split[after_idx] + table.insert(after_colon_split, commit_split[after_idx]) after_idx = after_idx + 1 end + local after_colon = table.concat(after_colon_split, ':') -- Check if commit introduces a breaking change. if vim.endswith(before_colon, '!') then @@ -247,8 +248,10 @@ function M._test() ['unknown: using unknown type'] = false, ['feat: foo:bar'] = true, ['feat: :foo:bar'] = true, + ['feat: :Foo:Bar'] = true, ['feat(something): foo:bar'] = true, ['feat(something): :foo:bar'] = true, + ['feat(something): :Foo:Bar'] = true, ['feat(:grep): read from pipe'] = true, ['feat(:grep/:make): read from pipe'] = true, ['feat(:grep): foo:bar'] = true, |