body

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

Documentation

Overview

Package body provides a linter that validates the commit message body against the configured length interval.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

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

Body represents a linter that validates the commit message body against the configured length interval.

func NewBody

func NewBody(
	body commit.Body,
	cfg body.Config,
) Body

NewBody creates a new Body linter with the provided commit message body and lint configuration.

func (Body) Issues

func (b Body) Issues() []issue.Issue

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

It returns no issues when the configured length interval is empty. Otherwise it counts the runes in the body and checks whether the count falls within the configured length interval. When the count is out of range, an issue is returned with the level from the configuration and a message describing the allowed interval.

Jump to

Keyboard shortcuts

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