aboutsummaryrefslogtreecommitdiff
path: root/scripts/lintcommit.lua
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-05-13 14:37:33 +0200
committerGitHub <noreply@github.com>2022-05-13 05:37:33 -0700
commit2875d45e79b80878af45c91702914f4f0d0e3dca (patch)
tree3ded807d6ade58283e64ef3de10cf3d2ef317f7d /scripts/lintcommit.lua
parent030417d80bac7fb3e9574b7cb1b81dca8fedda32 (diff)
downloadrneovim-2875d45e79b80878af45c91702914f4f0d0e3dca.tar.gz
rneovim-2875d45e79b80878af45c91702914f4f0d0e3dca.tar.bz2
rneovim-2875d45e79b80878af45c91702914f4f0d0e3dca.zip
ci(commitlint): ignore "fixup" commits #18556
Diffstat (limited to 'scripts/lintcommit.lua')
-rw-r--r--scripts/lintcommit.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua
index 6871858a0b..34d1263ff4 100644
--- a/scripts/lintcommit.lua
+++ b/scripts/lintcommit.lua
@@ -45,8 +45,13 @@ end
-- Returns nil if the given commit message is valid, or returns a string
-- message explaining why it is invalid.
local function validate_commit(commit_message)
- local commit_split = vim.split(commit_message, ":")
+ -- Return nil if the commit message starts with "fixup" as it signifies it's
+ -- a work in progress and shouldn't be linted yet.
+ if vim.startswith(commit_message, "fixup") then
+ return nil
+ end
+ local commit_split = vim.split(commit_message, ":")
-- Return nil if the type is vim-patch since most of the normal rules don't
-- apply.
if commit_split[1] == "vim-patch" then
@@ -183,6 +188,9 @@ function M._test()
['vim-patch:8.2.3374: Pyret files are not recognized (#15642)'] = true,
['vim-patch:8.1.1195,8.2.{3417,3419}'] = true,
['revert: "ci: use continue-on-error instead of "|| true""'] = true,
+ ['fixup'] = true,
+ ['fixup: commit message'] = true,
+ ['fixup! commit message'] = true,
[':no type before colon 1'] = false,
[' :no type before colon 2'] = false,
[' :no type before colon 3'] = false,