config

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Rules              []*rule.Rule `yaml:"rules"`
	IgnoreFiles        []string     `yaml:"ignore_files"`
	SuccessExitMessage *string      `yaml:"success_exit_message"`
	IncludeNote        bool         `yaml:"include_note"`
	ExcludeCategories  []string     `yaml:"exclude_categories"`
}

Config contains a list of rules

func NewConfig

func NewConfig(filename string, disableDefaultRules bool) (*Config, error)

NewConfig returns a new Config

func (*Config) ConfigureRules added in v0.1.13

func (c *Config) ConfigureRules(disableDefaultRules bool)

ConfigureRules adds the config Rules to DefaultRules Configure RegExps for all rules Configure IncludeNote for all rules Filter out any rules that fall under ExcludeCategories

func (*Config) GetSuccessExitMessage added in v0.8.0

func (c *Config) GetSuccessExitMessage() string

GetSuccessExitMessage returns the message to be shows on a successful exit as defined in the config, or a default message.

func (*Config) RemoveRule added in v0.14.0

func (c *Config) RemoveRule(i int)

Remove rule at index i in c.Rules while maintaining order

Jump to

Keyboard shortcuts

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