mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-05-23 14:20:55 -05:00
Add BNF grammar to explain things with less risk of ambiguity and to support implementing parsers #208
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @christianhujer on GitHub (Jul 6, 2024).
It would be great to have a BNF grammar to explain things with less risk of ambiguity and to support implementing parsers for checkers and alike.
Here's a start, using the ABNF from RFC5234.
I might come up with a PR if the idea of adding an ABNF grammar is accepted.
ABNF Definition of Conventional Commits
Projects may decide to put further restrictions on
typeNoun,scopeNoun, andfooterTokenas they deem useful.Declaration of Intended Compatibility
The intention of the ABNF grammar is to reflect what is written in the prose ruleset in the specification section. Any difference of the ABNF grammar from the specification ruleset is unintentional, by accident, and a mistake in the ABNF grammar. The ruleset takes precedence over the ABNF grammar.
References: