rule

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rule contains lint rules

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyMaxLenRule

type BodyMaxLenRule struct {
	CheckLen int
}

BodyMaxLenRule to validate max length of body

func (*BodyMaxLenRule) Apply added in v0.4.0

func (r *BodyMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*BodyMaxLenRule) Name

func (r *BodyMaxLenRule) Name() string

Name return name of the rule

func (*BodyMaxLenRule) Validate

func (r *BodyMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates BodyMaxLenRule

type BodyMaxLineLenRule

type BodyMaxLineLenRule struct {
	CheckLen int
}

BodyMaxLineLenRule to validate max line length of body

func (*BodyMaxLineLenRule) Apply added in v0.4.0

func (r *BodyMaxLineLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*BodyMaxLineLenRule) Name

func (r *BodyMaxLineLenRule) Name() string

Name return name of the rule

func (*BodyMaxLineLenRule) Validate

func (r *BodyMaxLineLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates BodyMaxLineLenRule rule

type BodyMinLenRule

type BodyMinLenRule struct {
	CheckLen int
}

BodyMinLenRule to validate min length of body

func (*BodyMinLenRule) Apply added in v0.4.0

func (r *BodyMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*BodyMinLenRule) Name

func (r *BodyMinLenRule) Name() string

Name return name of the rule

func (*BodyMinLenRule) Validate

func (r *BodyMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates BodyMinLenRule

type DescriptionMaxLenRule

type DescriptionMaxLenRule struct {
	CheckLen int
}

DescriptionMaxLenRule to validate max length of type

func (*DescriptionMaxLenRule) Apply added in v0.4.0

func (r *DescriptionMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*DescriptionMaxLenRule) Name

func (r *DescriptionMaxLenRule) Name() string

Name return name of the rule

func (*DescriptionMaxLenRule) Validate

func (r *DescriptionMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates DescriptionMaxLenRule

type DescriptionMinLenRule

type DescriptionMinLenRule struct {
	CheckLen int
}

DescriptionMinLenRule to validate min length of description

func (*DescriptionMinLenRule) Apply added in v0.4.0

func (r *DescriptionMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*DescriptionMinLenRule) Name

func (r *DescriptionMinLenRule) Name() string

Name return name of the rule

func (*DescriptionMinLenRule) Validate

func (r *DescriptionMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates DescriptionMinLenRule

type FooterMaxLenRule

type FooterMaxLenRule struct {
	CheckLen int
}

FooterMaxLenRule to validate max length of footer

func (*FooterMaxLenRule) Apply added in v0.4.0

func (r *FooterMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*FooterMaxLenRule) Name

func (r *FooterMaxLenRule) Name() string

Name return name of the rule

func (*FooterMaxLenRule) Validate

func (r *FooterMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates FooterMaxLenRule

type FooterMaxLineLenRule

type FooterMaxLineLenRule struct {
	CheckLen int
}

FooterMaxLineLenRule to validate max line length of footer

func (*FooterMaxLineLenRule) Apply added in v0.4.0

func (r *FooterMaxLineLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*FooterMaxLineLenRule) Name

func (r *FooterMaxLineLenRule) Name() string

Name return name of the rule

func (*FooterMaxLineLenRule) Validate

func (r *FooterMaxLineLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates FooterMaxLineLenRule rule

type FooterMinLenRule

type FooterMinLenRule struct {
	CheckLen int
}

FooterMinLenRule to validate min length of footer

func (*FooterMinLenRule) Apply added in v0.4.0

func (r *FooterMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*FooterMinLenRule) Name

func (r *FooterMinLenRule) Name() string

Name return name of the rule

func (*FooterMinLenRule) Validate

func (r *FooterMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates FooterMinLenRule

type HeadMaxLenRule

type HeadMaxLenRule struct {
	CheckLen int
}

HeadMaxLenRule to validate max length of header

func (*HeadMaxLenRule) Apply added in v0.4.0

func (r *HeadMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*HeadMaxLenRule) Name

func (r *HeadMaxLenRule) Name() string

Name return name of the rule

func (*HeadMaxLenRule) Validate

func (r *HeadMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates HeadMaxLenRule

type HeadMinLenRule

type HeadMinLenRule struct {
	CheckLen int
}

HeadMinLenRule to validate min length of header

func (*HeadMinLenRule) Apply added in v0.4.0

func (r *HeadMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*HeadMinLenRule) Name

func (r *HeadMinLenRule) Name() string

Name return name of the rule

func (*HeadMinLenRule) Validate

func (r *HeadMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates HeadMinLenRule

type ScopeCharsetRule

type ScopeCharsetRule struct {
	Charset string
}

ScopeCharsetRule to validate max length of header

func (*ScopeCharsetRule) Apply added in v0.4.0

func (r *ScopeCharsetRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*ScopeCharsetRule) Name

func (r *ScopeCharsetRule) Name() string

Name return name of the rule

func (*ScopeCharsetRule) Validate

func (r *ScopeCharsetRule) Validate(msg *lint.Commit) (string, bool)

Validate validates ScopeCharsetRule

type ScopeEnumRule

type ScopeEnumRule struct {
	Scopes []string

	AllowEmpty bool
}

ScopeEnumRule to validate max length of header

func (*ScopeEnumRule) Apply added in v0.4.0

func (r *ScopeEnumRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*ScopeEnumRule) Name

func (r *ScopeEnumRule) Name() string

Name return name of the rule

func (*ScopeEnumRule) Validate

func (r *ScopeEnumRule) Validate(msg *lint.Commit) (string, bool)

Validate validates ScopeEnumRule

type ScopeMaxLenRule

type ScopeMaxLenRule struct {
	CheckLen int
}

ScopeMaxLenRule to validate max length of type

func (*ScopeMaxLenRule) Apply added in v0.4.0

func (r *ScopeMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*ScopeMaxLenRule) Name

func (r *ScopeMaxLenRule) Name() string

Name return name of the rule

func (*ScopeMaxLenRule) Validate

func (r *ScopeMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates ScopeMaxLenRule

type ScopeMinLenRule

type ScopeMinLenRule struct {
	CheckLen int
}

ScopeMinLenRule to validate min length of scope

func (*ScopeMinLenRule) Apply added in v0.4.0

func (r *ScopeMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*ScopeMinLenRule) Name

func (r *ScopeMinLenRule) Name() string

Name return name of the rule

func (*ScopeMinLenRule) Validate

func (r *ScopeMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates ScopeMinLenRule

type TypeCharsetRule

type TypeCharsetRule struct {
	Charset string
}

TypeCharsetRule to validate max length of header

func (*TypeCharsetRule) Apply added in v0.4.0

func (r *TypeCharsetRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*TypeCharsetRule) Name

func (r *TypeCharsetRule) Name() string

Name return name of the rule

func (*TypeCharsetRule) Validate

func (r *TypeCharsetRule) Validate(msg *lint.Commit) (string, bool)

Validate validates TypeCharsetRule

type TypeEnumRule

type TypeEnumRule struct {
	Types []string
}

TypeEnumRule to validate types

func (*TypeEnumRule) Apply added in v0.4.0

func (r *TypeEnumRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*TypeEnumRule) Name

func (r *TypeEnumRule) Name() string

Name return name of the rule

func (*TypeEnumRule) Validate

func (r *TypeEnumRule) Validate(msg *lint.Commit) (string, bool)

Validate validates TypeEnumRule

type TypeMaxLenRule

type TypeMaxLenRule struct {
	CheckLen int
}

TypeMaxLenRule to validate max length of type

func (*TypeMaxLenRule) Apply added in v0.4.0

func (r *TypeMaxLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*TypeMaxLenRule) Name

func (r *TypeMaxLenRule) Name() string

Name return name of the rule

func (*TypeMaxLenRule) Validate

func (r *TypeMaxLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates TypeMaxLenRule

type TypeMinLenRule

type TypeMinLenRule struct {
	CheckLen int
}

TypeMinLenRule to validate min length of type

func (*TypeMinLenRule) Apply added in v0.4.0

func (r *TypeMinLenRule) Apply(arg interface{}, flags map[string]interface{}) error

Apply sets the needed argument for the rule

func (*TypeMinLenRule) Name

func (r *TypeMinLenRule) Name() string

Name return name of the rule

func (*TypeMinLenRule) Validate

func (r *TypeMinLenRule) Validate(msg *lint.Commit) (string, bool)

Validate validates TypeMinLenRule

Jump to

Keyboard shortcuts

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