commit

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 commit provides linters that validate git commit messages against the configured rules by aggregating issues from sub-linters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

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

Commit represents a linter that validates a single git commit against the configured commit message rules.

func NewCommit

func NewCommit(
	c commit.Commit,
	cfg config.Config,
) Commit

NewCommit creates a new Commit linter with the provided git commit and lint configuration.

func (Commit) Issues

func (c Commit) Issues() []issue.Issue

Issues returns a slice of issues describing any validation problems found in the commit message.

It delegates to the message sub-linter, which aggregates issues from the task, subject, and body sub-linters.

type Commits

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

Commits represents a linter that validates a collection of git commits against the configured commit message rules.

func NewCommits

func NewCommits(
	commits []commit.Commit,
	cfg config.Config,
) Commits

NewCommits creates a new Commits linter with the provided git commits and lint configuration.

func (Commits) Issues

func (c Commits) Issues() []issue.Issue

Issues returns a slice of issues describing any validation problems found across all the commits.

It aggregates issues from each commit by building a Commit linter for every entry and collecting the issues it reports.

Directories

Path Synopsis
Package message provides a linter that validates a complete commit message by aggregating issues from its task, subject, and body sub-linters.
Package message provides a linter that validates a complete commit message by aggregating issues from its task, subject, and body sub-linters.
body
Package body provides a linter that validates the commit message body against the configured length interval.
Package body provides a linter that validates the commit message body against the configured length interval.
subject
Package subject provides a linter that validates a commit message subject by aggregating issues from its type, scope, and description sub-linters.
Package subject provides a linter that validates a commit message subject by aggregating issues from its type, scope, and description sub-linters.
subject/description
Package description provides a linter that validates the length of the commit message subject description against the configured interval.
Package description provides a linter that validates the length of the commit message subject description against the configured interval.
task
Package task provides a linter that validates the task identifier in a commit message against the configured pattern.
Package task provides a linter that validates the task identifier in a commit message against the configured pattern.
Package scope provides a linter for validating commit scope against the configured pattern.
Package scope provides a linter for validating commit scope against the configured pattern.
Package types provides a linter for validating commit types against the configured allowed types.
Package types provides a linter for validating commit types against the configured allowed types.

Jump to

Keyboard shortcuts

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