conventional-commits / conventionalcommits.org

The conventional commits specification

Home Page:https://conventionalcommits.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specification doesn't permit footers without a body

Susko3 opened this issue · comments

  1. A longer commit body MAY be provided after the short description [...]
  2. [...]
  3. One or more footers MAY be provided one blank line after the body. [...]

Since the footers are after the body, if there is no body -- there can't be any footers.

The examples show a commit message with only a description and footers, but no body:

### Commit message with both `!` and BREAKING CHANGE footer
```
chore!: drop support for Node 6
BREAKING CHANGE: use JavaScript features not available in Node 6.
```

The syntax given in the summary already makes clear that body is optional, and footers can be added even if body is absent, as in the example that you referred:

<type>[optional scope]: <description>
[optional body]
[optional footer(s)]

However, it's not clear whether "summary and example" take precedence over "specification" or vice-versa. Not without reason, one could assert that the "specification" holds the utmost authority as the definitive source of truth, while any other text simply strives to convey or interpret such specification.

-One or more footers MAY be provided one blank line after the body
+One or more footers MAY be provided one blank line after the body (or one blank line after the description, if body is omitted).