aboutsummaryrefslogtreecommitdiff
path: root/scripts/lintcommit.lua
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2024-06-07 05:36:14 +0200
committerGitHub <noreply@github.com>2024-06-07 11:36:14 +0800
commit6c7677e5d274da7e477518aa29b0faa862e61627 (patch)
tree79ad88ef1c8d0b9a7e4452f8f6e7e4f16b0f598d /scripts/lintcommit.lua
parent8c5af0eb85a3932f6ca018d2aa681521369a26be (diff)
downloadrneovim-6c7677e5d274da7e477518aa29b0faa862e61627.tar.gz
rneovim-6c7677e5d274da7e477518aa29b0faa862e61627.tar.bz2
rneovim-6c7677e5d274da7e477518aa29b0faa862e61627.zip
revert(commitlint): stop ignoring "fixup" commits (#29184)
This reverts 2875d45e79b80878af45c91702914f4f0d0e3dca. Allowing lintcommit to ignore "fixup" makes it too easy to fixup commits to be merged on master as the CI won't give any indications that something is wrong. Contributors can always squash their pull requests if it annoys them too much.
Diffstat (limited to 'scripts/lintcommit.lua')
-rw-r--r--scripts/lintcommit.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/scripts/lintcommit.lua b/scripts/lintcommit.lua
index 96f6304247..f0e2feaab3 100644
--- a/scripts/lintcommit.lua
+++ b/scripts/lintcommit.lua
@@ -41,12 +41,6 @@ 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)
- -- 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, ':', { plain = true })
-- Return nil if the type is vim-patch since most of the normal rules don't
-- apply.
@@ -229,9 +223,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,
+ ['fixup'] = false,
+ ['fixup: commit message'] = false,
+ ['fixup! commit message'] = false,
[':no type before colon 1'] = false,
[' :no type before colon 2'] = false,
[' :no type before colon 3'] = false,