types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package types provides a linter for validating commit types against the configured allowed types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Types

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

Types represents a linter that validates commit type against the configured allowed types.

func NewTypes

func NewTypes(
	typ commit.Type,
	cfg types.Config,
) Types

NewTypes creates a new Types linter with the provided commit type and lint configuration that defines the allowed commit types.

func (Types) Issues

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

Issues returns a slice of issues describing any validation problems with the commit type.

It returns no issues when type validation is not configured, that is when the allowed types list is empty and its level is unspecified. Otherwise it reports an issue when the commit type is not one of the configured allowed types, using the level from the configuration. When the commit type is empty and allowed types are configured, the issue is escalated to critical.

Jump to

Keyboard shortcuts

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