message

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: 8 Imported by: 0

Documentation

Overview

Package message provides a linter that validates a complete commit message by aggregating issues from its task, subject, and body sub-linters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

Message represents a linter that validates a complete commit message by aggregating issues from its task, subject, and body sub-linters.

func NewMessage

func NewMessage(
	msg commit.Message,
	cfg message.Config,
	typcfg types.Config,
	scpcfg scope.Config,
) Message

NewMessage creates a new Message linter with the provided commit message and lint configurations.

  • msg: the parsed commit message to validate.
  • cfg: the message-level configuration providing subject and body sub-configs.
  • typcfg: the configuration defining the allowed commit types.
  • scpcfg: the configuration defining the pattern used to validate the commit scope.

func (Message) Issues

func (m Message) Issues() []issue.Issue

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

It aggregates issues from the subject and body sub-linters. When the body is empty and the configuration marks it as mandatory for the commit type, a critical issue is returned instead of running the body sub-linter.

Directories

Path Synopsis
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.
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.
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.
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.

Jump to

Keyboard shortcuts

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