config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DisableAll bool
	// NOTE: Deprecated, soon be removed from golangci-lint.
	EnableAll bool

	// A map to indicate which linters are enabled.
	Linters map[string]Linter
}

Config is part of configuration for golangci-lint, especially regarding linters.

type Linter

type Linter struct {
	// contains filtered or unexported fields
}

Linter represents a linter available on golangci-lint.

func NewLinters

func NewLinters(linters []report.LinterData) []Linter

NewLinters converts LinterData represented internally into the opinionated Linter.

func (*Linter) Disable

func (l *Linter) Disable()

Disable makes itself disabled.

func (*Linter) Enable

func (l *Linter) Enable()

Enable makes itself enabled.

func (*Linter) Enabled

func (l *Linter) Enabled() bool

func (*Linter) EnabledByConfig

func (l *Linter) EnabledByConfig() bool

func (*Linter) Name

func (l *Linter) Name() string

type Mapper

type Mapper struct {
	Linters struct {
		EnableAll  bool `mapstructure:"enable-all"`
		DisableAll bool `mapstructure:"disable-all"`
	}
}

Mapper is used for temporary mapping to config file.

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(cfg *Config, logger *logrus.Entry) *Reader

func (*Reader) Read

func (r *Reader) Read() error

Read parses user's golangci-lint config and populate its own Config pointer.

Jump to

Keyboard shortcuts

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