lintersdb

package
v1.58.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 123 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPresets

func AllPresets() []string

Types

type AnalyzerPlugin added in v1.23.0

type AnalyzerPlugin interface {
	GetAnalyzers() []*analysis.Analyzer
}

type Builder added in v1.57.0

type Builder interface {
	Build(cfg *config.Config) ([]*linter.Config, error)
}

type LinterBuilder added in v1.57.0

type LinterBuilder struct{}

LinterBuilder builds the "internal" linters based on the configuration.

func NewLinterBuilder added in v1.57.0

func NewLinterBuilder() *LinterBuilder

NewLinterBuilder creates a new LinterBuilder.

func (LinterBuilder) Build added in v1.57.0

func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error)

Build loads all the "internal" linters. The configuration is use for the linter settings.

type Manager added in v1.10.2

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

Manager is a type of database for all linters (internals or plugins). It provides methods to access to the linter sets.

func NewManager added in v1.10.2

func NewManager(log logutils.Log, cfg *config.Config, builders ...Builder) (*Manager, error)

NewManager creates a new Manager. This constructor will call the builders to build and store the linters.

func (*Manager) GetAllEnabledByDefaultLinters added in v1.10.2

func (m *Manager) GetAllEnabledByDefaultLinters() []*linter.Config

func (*Manager) GetAllLinterConfigsForPreset added in v1.10.2

func (m *Manager) GetAllLinterConfigsForPreset(p string) []*linter.Config

func (*Manager) GetAllSupportedLinterConfigs added in v1.10.2

func (m *Manager) GetAllSupportedLinterConfigs() []*linter.Config

func (*Manager) GetEnabledLintersMap added in v1.57.0

func (m *Manager) GetEnabledLintersMap() (map[string]*linter.Config, error)

func (*Manager) GetLinterConfigs added in v1.20.0

func (m *Manager) GetLinterConfigs(name string) []*linter.Config

func (*Manager) GetOptimizedLinters added in v1.57.0

func (m *Manager) GetOptimizedLinters() ([]*linter.Config, error)

GetOptimizedLinters returns enabled linters after optimization (merging) of multiple linters into a fewer number of linters. E.g. some go/analysis linters can be optimized into one metalinter for data reuse and speed up.

type PluginGoBuilder added in v1.57.0

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

PluginGoBuilder builds the custom linters (Go plugin) based on the configuration.

func NewPluginGoBuilder added in v1.57.0

func NewPluginGoBuilder(log logutils.Log) *PluginGoBuilder

NewPluginGoBuilder creates new PluginGoBuilder.

func (*PluginGoBuilder) Build added in v1.57.0

func (b *PluginGoBuilder) Build(cfg *config.Config) ([]*linter.Config, error)

Build loads custom linters that are specified in the golangci-lint config file.

type PluginModuleBuilder added in v1.57.0

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

PluginModuleBuilder builds the custom linters (module plugin) based on the configuration.

func NewPluginModuleBuilder added in v1.57.0

func NewPluginModuleBuilder(log logutils.Log) *PluginModuleBuilder

NewPluginModuleBuilder creates new PluginModuleBuilder.

func (*PluginModuleBuilder) Build added in v1.57.0

func (b *PluginModuleBuilder) Build(cfg *config.Config) ([]*linter.Config, error)

Build loads custom linters that are specified in the golangci-lint config file.

type Validator added in v1.10.2

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

func NewValidator added in v1.10.2

func NewValidator(m *Manager) *Validator

func (Validator) Validate added in v1.57.0

func (v Validator) Validate(cfg *config.Config) error

Validate validates the configuration by calling all other validators for different sections in the configuration and then some additional linter validation functions.

Jump to

Keyboard shortcuts

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