Documentation
¶
Overview ¶
Package config contains helpers, defaults for linter
Index ¶
- Constants
- func GetConfig(confPath string) (*lint.Config, error)
- func GetDefaultConf(onlyEnabled bool) *lint.Config
- func GetEnabledRules(conf *lint.Config) ([]lint.Rule, error)
- func GetFormatter(conf *lint.Config) (lint.Formatter, error)
- func GetLinter(conf *lint.Config) (*lint.Linter, error)
- func Parse(confPath string) (*lint.Config, error)
- func RegisterFormatter(format lint.Formatter) error
- func RegisterRule(rule lint.Rule) error
- func Validate(conf *lint.Config) []error
- func WriteConfToFile(outFilePath string, conf *lint.Config) (retErr error)
Constants ¶
View Source
const (
// DefaultFile represent default config file name
DefaultFile = "commitlint.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func GetConfig ¶
GetConfig gets the config according to precedence if needed parses config file and returns config instance
func GetDefaultConf ¶ added in v0.5.0
GetDefaultConf writes default config to given file
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 RegisterFormatter ¶ added in v0.4.0
RegisterFormatter registers a custom formatter if formatter already exists, returns error
func RegisterRule ¶ added in v0.4.0
RegisterRule registers a custom rule if rule already exists, returns error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.