Documentation
¶
Overview ¶
Package scope provides a linter for validating commit scope against the configured pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope represents a linter that validates commit scope against the configured pattern.
func NewScope ¶
NewScope creates a new Scope linter with the provided commit scope and lint configuration that defines the pattern used to validate the commit scope.
func (Scope) Issues ¶
Issues returns a slice of issues describing any validation problems with the commit scope.
It returns no issues when the configured pattern is empty. Otherwise it matches the scope against the regex pattern from the linter configuration. If the pattern fails to compile, a critical issue is returned describing the compilation error. If the scope does not match the pattern, an issue is returned with the level from the configuration.