scope

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 4 Imported by: 0

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

func NewScope(
	scp commit.Scope,
	cfg scope.Config,
) Scope

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

func (s Scope) Issues() []issue.Issue

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL