config

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package config contains helpers, defaults for linter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnabledRules added in v0.4.0

func GetEnabledRules(conf *lint.Config) ([]lint.Rule, error)

GetEnabledRules forms Rule object for rules which are enabled in config

func GetFormatter

func GetFormatter(conf *lint.Config) (lint.Formatter, error)

GetFormatter returns the formatter as defined in conf

func LookupAndParse added in v0.8.0

func LookupAndParse() (*lint.Config, error)

LookupAndParse gets the config path according to the precedence if exists, parses the config file and returns config instance

func NewDefault added in v0.8.0

func NewDefault() *lint.Config

NewDefault returns default config

func NewLinter added in v0.8.0

func NewLinter(conf *lint.Config) (*lint.Linter, error)

NewLinter returns Linter for given confFilePath

func Parse

func Parse(confPath string) (*lint.Config, error)

Parse parse given file in confPath, and return Config instance, error if any

func Validate

func Validate(conf *lint.Config) []error

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 atleast minimum than commitlint version used

func WriteTo added in v0.8.0

func WriteTo(w io.Writer, conf *lint.Config) (retErr error)

WriteTo writes config in yaml format to given io.Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

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