Documentation
¶
Overview ¶
Package conventionalcommit parses and inspects commit messages against the Conventional Commits 1.0.0 grammar. It validates structure only — it does not enforce a type allow-list (that policy decision lives in internal/app.VerifyCommit) and it does not replicate the broader commitlint-style rule catalog (casing, length limits, signed-off-by, etc.) — see ADR-0027's "Explicitly still out of scope" note.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFixupCommit ¶
IsFixupCommit reports whether message is a git "fixup!"/"squash!" autosquash commit.
func IsMergeCommit ¶
IsMergeCommit reports whether message is a git-generated merge commit ("Merge branch ...", "Merge pull request ...", "Merge remote-tracking branch ...").
Types ¶
type Commit ¶
Commit is the structural result of parsing a conventional-commit message.
func Parse ¶
Parse validates message against the Conventional Commits grammar and returns its structural components. It enforces grammar only — callers needing a type allow-list apply that policy themselves (see internal/app.VerifyCommit).
type Footer ¶
type Footer struct {
}
Footer is one trailer in a commit message's footer block, e.g. "Acked-by: Alice" or "BREAKING CHANGE: removes the old flag".
func ParseFooterLine ¶ added in v0.44.0
ParseFooterLine parses a single footer trailer line for message construction (the commit wizard). ok is false when line is not a valid footer. Unlike the internal footer-block parser used by Parse, it preserves the leading "#" of the "Token #value" form so the result round-trips through Format.