Documentation
¶
Overview ¶
Package config contains helpers, defaults for linter
Index ¶
- Constants
- func DefaultConfToFile(isOnlyEnabled bool) error
- func GetConfig(flagConfPath string) (*lint.Config, error)
- func GetConfigPath(confFilePath string) (string, bool, error)
- 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 (
// ConfFileName represent config file name
ConfFileName = "commitlint.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultConfToFile ¶
DefaultConfToFile writes default config to given file
func GetConfigPath ¶
GetConfigPath returns config file path, follwing below
- check for conf in current directory
- check for conf flag
- load default conf
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.