Documentation
¶
Overview ¶
Package message provides helpers for inspecting commit messages.
The package focuses on classifying a commit message by its kind, such as a revert commit or a default commit, so that the linting process can split commits accordingly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses a commit message to derive facts about it.
Parser takes the message as-is and answers questions about the commit behind it without modifying it, such as whether the commit is a revert commit.
func (Parser) IsRevert ¶
IsRevert reports whether the parsed message belongs to a revert commit.
The commit is a revert commit when the subject starts with "Revert " or when the commit type of the subject equals "revert" case-insensitively.
The parser never reports merge commits, as merge commits are detected by the caller from the commit parents.