task

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 task provides a linter that validates the task identifier in a commit message against the configured pattern.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task represents a linter that validates the task identifier in a commit message against the configured pattern.

func NewTask

func NewTask(
	msg commit.Message,
	cfg task.Config,
) Task

NewTask creates a new Task linter with the provided commit message and lint configuration that defines the pattern used to validate the task identifier.

func (Task) Issues

func (t Task) Issues() []issue.Issue

Issues returns a slice of issues describing any validation problems with the task identifier in the commit message.

It returns no issues when the configured task identifier pattern is empty. Otherwise it compiles the pattern into a regular expression and extracts the ticket from the message subject. If the pattern fails to compile, a critical issue is returned describing the compilation error. If no ticket matching the pattern is found in the subject, an issue is returned with the level from the configuration.

Only the subject line of the message is searched for a ticket; the body is never inspected.

Jump to

Keyboard shortcuts

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