subject

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 subject provides a linter that validates a commit message subject by aggregating issues from its type, scope, and description sub-linters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subject

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

Subject represents a linter that validates a commit message subject by aggregating issues from its type, scope, and description sub-linters.

func NewSubject

func NewSubject(
	subj commit.Subject,
	cfg subject.Config,
	typcfg types.Config,
	scpcfg scope.Config,
) Subject

NewSubject creates a new Subject linter with the provided commit message subject and lint configurations.

  • subj: the parsed commit message subject to validate.
  • cfg: the subject-level configuration providing the description sub-config.
  • typcfg: the configuration defining the allowed commit types.
  • scpcfg: the configuration defining the pattern used to validate the commit scope.

func (Subject) Issues

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

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

It aggregates issues from three sub-linters, each built from the corresponding part of the subject and its configuration: the commit type, the scope, and the description.

Directories

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

Jump to

Keyboard shortcuts

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