Specification doesn't permit footers without a body
Susko3 opened this issue · 2 comments
- A longer commit body MAY be provided after the short description [...]
- [...]
- 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:
conventionalcommits.org/content/v1.0.0/index.md
Lines 65 to 70 in 325b74f
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:
conventionalcommits.org/content/v1.0.0/index.md
Lines 21 to 25 in 325b74f
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).
My reading
- Subject is mandatory
- Body is optional
- Footer is optional and comes after body
Then I read this case (subject + footer)
- Footer comes after body
- But there is no body
- Subject comes before body
- Therefore footer comes after subject