Documentation
¶
Overview ¶
Package config contains helpers, defaults for linter
Index ¶
- Constants
- func DefaultIgnorePatterns() []string
- func DefaultTypeEnums() []interface{}
- func GetEnabledRules(conf *lint.Config) ([]lint.Rule, error)
- func GetFormatter(conf *lint.Config) (lint.Formatter, error)
- func LookupAndParse() (*lint.Config, error)
- func NewDefault() *lint.Config
- func NewLinter(conf *lint.Config) (*lint.Linter, error)
- func Parse(confPath string) (*lint.Config, error)
- func Validate(conf *lint.Config) []error
- func WriteCompactTo(w io.Writer, conf *lint.Config) error
- func WriteTo(w io.Writer, conf *lint.Config) (retErr error)
Constants ¶
const ( DefaultTypeCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" DefaultScopeCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/," )
Variables ¶
This section is empty.
Functions ¶
func DefaultIgnorePatterns ¶ added in v0.11.0
func DefaultIgnorePatterns() []string
DefaultIgnorePatterns returns the default list of ignore patterns These patterns match commit messages auto-generated by git commands like merge, revert, fixup, squash, etc.
func DefaultTypeEnums ¶ added in v0.11.0
func DefaultTypeEnums() []interface{}
DefaultTypeEnums returns the default list of type enums
func GetEnabledRules ¶ added in v0.4.0
GetEnabledRules forms Rule object for rules which are enabled in config
func GetFormatter ¶
GetFormatter returns the formatter as defined in conf
func LookupAndParse ¶ added in v0.8.0
LookupAndParse gets the config path according to the precedence if exists, parses the config file and returns config instance
func Validate ¶
Validate validates given config instance, it checks the following If formatters, rules are registered/known If arguments to rules are valid If version is valid and at least minimum than commitlint version used
func WriteCompactTo ¶ added in v0.11.0
WriteCompactTo writes config in yaml format to given io.Writer. Only settings for enabled rules are written, keeping the output compact.
Types ¶
This section is empty.