body-leading-blank complains about missing line
See original GitHub issueExpected Behavior
body-leading-blank
should pass if the body has a leading blank line
Current Behavior
body-leading-blank
returns a warning if the body has a leading blank line
and is present.
If no body exists no warning is returned
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
Steps to Reproduce (for bugs)
- create a message like below
chore(zf9012): zf9012 模块加入 modules.pro
import_lib 中包含第三方依赖库和其配置
$ commitlint -e
⧗ input: chore(zf9012): zf9012 模块加入 modules.pro
⚠ body must have leading blank line [body-leading-blank]
⚠ found 0 problems, 1 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
commitlint.config.js
{
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [1, 'always'], // body 和 header 之间总是包含空行
'footer-leading-blank': [1, 'always'], // footer 和 body 之间总是包含空行
'header-max-length': [2, 'always', 72], // header 的最大长度
'scope-case': [2, 'always', 'lower-case'], // scope 总是为小写
'scope-empty': [2, 'never'], // scope 不允许为空
'scope-enum': [ // scope 必须满足以下字段
2,
'always',
[
'ladybug5',
'ladybug5p',
'lbas',
'lucid',
'novatel',
'octans',
'r2sonic',
'riegl',
'seabat7125',
'zf9012',
'non-sensor'
]
],
'subject-case': [ // subject 不允许为以下格式
2,
'never',
[
'sentence-case', // Sentence case
'start-case', // Start Case
'pascal-case', // PascalCase
'upper-case' // UPPERCASE
]
],
'subject-empty': [2, 'never'], // subject 不允许为空
'subject-full-stop': [2, 'never', '.'], // subject 不允许以 . 结尾
'type-case': [2, 'always', 'lower-case'], // type 总是为小写
'type-empty': [2, 'never'], // type 不允许为空
'type-enum': [ // type 必须满足以下字段
2,
'always',
[
'build', // 编译环境发生改变
'chore', // 构建构成或辅助工具的变动 (eg: 本文件的改动)
'ci', // 持续集成环境改变
'docs', // 文档修改
'feat', // 新增功能
'fix', // 修复 bug
'perf', // 性能优化
'refactor', // 重构,既不是新功能的增加,也不是修复 bug
'revert', // 回退
'style', // 代码样式的变更
'test' // 测试
]
]
}
}
Context
Your Environment
Executable | Version |
---|---|
commitlint --version |
8.2.0 |
git --version |
2.240.0.windows.1 |
node --version |
v12.13.1 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Body must have leading blank line - training - Autonomic Jump
I have a blank line between title and body. Can someone please point to the right direction?
Read more >[issue14925] email package does not register defect when blank ...
[issue14925] email package does not register defect when blank line between header and body is missing. R. David Murray report at bugs.python.org
Read more >Beck - No Complaints - YouTube
Music video by Beck performing No Complaints. (C) 2006 Interscope Records.
Read more >Taylor Swift - We Are Never Ever Getting Back Together
Music video by Taylor Swift performing We Are Never Ever Getting Back Together. ©: 2012 Big Machine Records, LLC.
Read more >Fix Paperback and Hardcover Formatting Issues
Do your images that bleed not extend far enough beyond the trim line? ... we allow no more than 4 consecutive blank pages...
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
other PC is windows, it worked …
@mschilli87 please open a new issue an provide more info, i.e. commit message, OS, commitlint-config, whatever might be relevant. Thanks