Reference may not be empty
See original GitHub issueExpected Behavior
➜ echo "feat(code): KON-69 fix navbar style" | npx commitlint
⧗ input: feat(code): KON-69 fix navbar style
✔ found 0 problems, 0 warnings
Current Behavior
➜ echo "feat(code): KON-69 fix navbar style" | npx commitlint
⧗ input: feat(code): KON-69 fix navbar style
✖ references may not be empty [references-empty]
✖ found 1 problems, 0 warnings
~/code/1k/frontend develop
code/1k/frontend on develop
➜ echo "feat(code): KON-69 change navbar style" | npx commitlint
⧗ input: feat(code): KON-69 change navbar style
✔ found 0 problems, 0 warnings
~/code/1k/frontend develop
code/1k/frontend on develop
➜ echo "feat(code): KON-69 update navbar style" | npx commitlint
⧗ input: feat(code): KON-69 update navbar style
✔ found 0 problems, 0 warnings
Affected packages
- [x ] cli
commitlint.config.js
/**
* If you need to add your own validated
* scope for git commit message, just add a new value to scope-enum
* as shown below
* code - this is general scope
* deployment - when devops team does something related to CI/CD
* see this: https://github.com/marionebl/commitlint/blob/master/%40commitlint/config-conventional/index.js
* this solution require JIRA project prefix defined in issuePrefixes
* and then reference-empty rule
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
issuePrefixes: ['KON-'],
},
},
rules: {
'header-max-length': [ 1, 'always', 72 ],
'scope-enum': [ 1, 'always', [
'code',
'deployment',
'tests',
] ],
'references-empty': [ 2, 'never' ],
},
Your Environment
Executable | Version |
---|---|
commitlint --version |
6.1.3 |
git --version |
2.7.1 |
node --version |
8.7.0 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
husky - Strange error when attempting to commit. [subject-empty]
There is a package called husky that defines a certain template for your commit messages. If the template is not fulfilled, one gets...
Read more >Blank, Coalesce, IsBlank, and IsEmpty functions in Power Apps
In the context of the IsEmpty function, empty is specific to tables that contain no records. The table structure may be intact, complete...
Read more >How to delete parentheses for empty fields in references? - TeX
In particular issuing a \clearfield when the field is already empty will not bring any improvement whatsoever. There are two main reasons that...
Read more >How to Write Good Commit Messages with Commitlint
This is not a good practice, as commit messages should be helpful and ... an empty JavaScript project with the respective package manager....
Read more >Promela Reference -- empty(5) - Spin
empty - predefined, boolean function to test emptiness of a buffered ... The expression in which it appears, though, may not be negated....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is because
fix
is a reserved word that expects to be followed by issue number. GitHub will then automatically close that issue after merging such commit into the default branch.@viktorsec is right, this is indeed correct yet a bit surprising behavior driven by
conventional-commits-parser
’s defaults:.You could work around this by passing an empty
referenceActions
array to conventional changelog: