Documentation
¶
Overview ¶
Package types provides a linter for validating commit types against the configured allowed types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Types ¶
type Types struct {
// contains filtered or unexported fields
}
Types represents a linter that validates commit type against the configured allowed types.
func NewTypes ¶
NewTypes creates a new Types linter with the provided commit type and lint configuration that defines the allowed commit types.
func (Types) Issues ¶
Issues returns a slice of issues describing any validation problems with the commit type.
It returns no issues when type validation is not configured, that is when the allowed types list is empty and its level is unspecified. Otherwise it reports an issue when the commit type is not one of the configured allowed types, using the level from the configuration. When the commit type is empty and allowed types are configured, the issue is escalated to critical.