Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specification doesn't permit footers without a body #568

Open
Susko3 opened this issue Feb 4, 2024 · 2 comments · May be fixed by #569
Open

Specification doesn't permit footers without a body #568

Susko3 opened this issue Feb 4, 2024 · 2 comments · May be fixed by #569

Comments

@Susko3
Copy link

Susko3 commented Feb 4, 2024

  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.
```

javier-godoy added a commit to javier-godoy/conventionalcommits.org that referenced this issue Feb 4, 2024
@javier-godoy
Copy link

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).

@LemmingAvalanche
Copy link

My reading

  1. Subject is mandatory
  2. Body is optional
  3. Footer is optional and comes after body

Then I read this case (subject + footer)

  1. Footer comes after body
  2. But there is no body
  3. Subject comes before body
  4. Therefore footer comes after subject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants