config

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

Documentation

Overview

Package config provides types and functions for working with lint configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config represents the main configuration for the lint tool.

func Load

func Load(fpath string) (*Config, error)

Load reads content from provided filepath and unmarshals YAML file to Config or returns error if file reading or unmarshaling failed.

func NewConfig

func NewConfig(opts ...Option) *Config

NewConfig creates a new Config instance with the provided configurations.

func Unmarshal

func Unmarshal(bb []byte) (*Config, error)

Unmarshal unmarshals YAML content and returns a Config instance containing the configuration, or returns an error if unmarshaling fails.

func (Config) Branch

func (c Config) Branch() branch.Config

Branch returns the configuration for branch-related rules.

func (Config) Commit

func (c Config) Commit() commit.Config

Commit returns the configuration for commit-related rules.

type Option

type Option func(*Config)

Option configures a Config instance on its creation.

func WithBranch

func WithBranch(br branch.Config) Option

WithBranch sets branch-related configuration.

func WithCommit

func WithCommit(cfg commit.Config) Option

WithCommit sets commit-related configuration.

Directories

Path Synopsis
Package branch provides types and functions for working with commit branch configuration.
Package branch provides types and functions for working with commit branch configuration.
defaults
Package defaults provides types and functions to work with configuration of the default branch.
Package defaults provides types and functions to work with configuration of the default branch.
name
Package name provides types and functionality to work with configuration of branch names.
Package name provides types and functionality to work with configuration of branch names.
Package commit provides configuration types for the commit message portion of a git lint run.
Package commit provides configuration types for the commit message portion of a git lint run.
message
Package message provides configuration types for the commit message portion of a git branch lint run, grouping the subject and body configurations and the functional options to build the message config.
Package message provides configuration types for the commit message portion of a git branch lint run, grouping the subject and body configurations and the functional options to build the message config.
message/body
Package body provides the configuration of the commit message body, including its length interval and the functional options to build the config.
Package body provides the configuration of the commit message body, including its length interval and the functional options to build the config.
message/body/mandate
Package mandate configures the set of commit types for which the commit message body is mandatory.
Package mandate configures the set of commit types for which the commit message body is mandatory.
message/subject
Package subject provides the configuration of the commit message subject, including its description and task integration, and the functional options to build the config.
Package subject provides the configuration of the commit message subject, including its description and task integration, and the functional options to build the config.
message/subject/description
Package description provides the configuration of the commit message subject description, including its length interval and the functional options to build the config.
Package description provides the configuration of the commit message subject description, including its length interval and the functional options to build the config.
scope
Package scope provides the configuration of the commit message subject scope.
Package scope provides the configuration of the commit message subject scope.
types
Package types provides the configuration of the commit types allowed during a git lint run.
Package types provides the configuration of the commit types allowed during a git lint run.
Package task provides types and functions for working with task (issue) configuration.
Package task provides types and functions for working with task (issue) configuration.
id
Package id provides types and functions for working with task (issue) identifier configuration.
Package id provides types and functions for working with task (issue) identifier configuration.
Package value provides types and functionality to work with config values.
Package value provides types and functionality to work with config values.

Jump to

Keyboard shortcuts

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