转自:git commit 规范不对导致报错subject may not be empty [subject-empty]type may not be empty [type-empty] 配置lint 检查后,使用commitlint之后报错 报错信息 ⧗ input: feat:初始化项目 ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 pro...
配置lint 检查后,使用commitlint之后报错 报错信息 ⧗ input: feat:初始化项目 ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitl...
解决办法 提交信息加 “fix: xxxxx” fix后面一定要加空格! git commit -m "fix: xxxx"
"build","ci","chore","revert"],"scope":{"required":false,"allowed":["*"],"validate":false,"multiple":false},"warnOnFail":false,"maxSubjectLength":100,"subjectPattern":".+","subjectPatternErrorMsg":"subject does not match subject pattern!
验证提交信息: 在提交代码时,如果提交信息不符合规范,Git将拒绝提交并显示错误信息。例如: bash git commit -m "修改了一些东西" 将显示类似以下错误信息: text ⧗ input: 修改了一些东西✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems...
1:使用 husky + commitlint 检查提交描述是否符合规范要求 在上一小节中,我们了解了git hooks的概念,那么接下来我们就使用git hooks来去校验我们的提交信息。 要完成这么个目标,那么我们需要使用两个工具: commitlint:用于检查提交信息 husky:是git hooks工具 ...
至此, 不符合规范的 commit 将不再可提交: PS F:\xxxxxxxxxxxxxxxxxxxxx\imooc-admin> git commit -m "测试" ⧗ input: 测试 ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ...
INVALID COMMIT MSG: does not match "<type>(<scope>): <subject>" ! jartto:fix bug 这里之所以报出这个警告,是因为我的提交出现了两个问题: 其一,使用了规范外的关键字; 其二,很细节的问题,jartto:后少了空格; 这时候我才回忆起来,当时提交一直失败,情急之下直接强制提交,所以以后的提交都会抱出这个异常...
downloaded 0, added 125, done ⧗ input: 新增 husky commitlit ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint ... 总结 ...
✖ subject may not be empty[subject-empty]✖ type may not be empty[type-empty]✖ found2problems,0warnings ⓘ Get help:https://github.com/conventional-changelog/commitlint/#what-is-commitlint husky>commit-msg hookfailed(add--no-verify to bypass) ...