pkg

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PresetFormatting  = "format"
	PresetComplexity  = "complexity"
	PresetStyle       = "style"
	PresetBugs        = "bugs"
	PresetUnused      = "unused"
	PresetPerformance = "performance"
)

Variables

This section is empty.

Functions

func AllPresets

func AllPresets() []string

Types

type Linter

type Linter interface {
	Run(ctx context.Context, lintCtx *golinters.Context) ([]result.Issue, error)
	Name() string
	Desc() string
}

func GetAllLintersForPreset

func GetAllLintersForPreset(p string) []Linter

func GetEnabledLinters

func GetEnabledLinters(cfg *config.Config) ([]Linter, error)

type LinterConfig

type LinterConfig struct {
	Linter           Linter
	EnabledByDefault bool
	DoesFullImport   bool
	NeedsSSARepr     bool
	InPresets        []string
	Speed            int // more value means faster execution of linter
}

func GetAllSupportedLinterConfigs

func GetAllSupportedLinterConfigs() []LinterConfig

func GetLinterConfig

func GetLinterConfig(name string) *LinterConfig

func (LinterConfig) WithFullImport

func (lc LinterConfig) WithFullImport() LinterConfig

func (LinterConfig) WithPresets

func (lc LinterConfig) WithPresets(presets ...string) LinterConfig

func (LinterConfig) WithSSA

func (lc LinterConfig) WithSSA() LinterConfig

func (LinterConfig) WithSpeed

func (lc LinterConfig) WithSpeed(speed int) LinterConfig

type SimpleRunner

type SimpleRunner struct {
	Processors []processors.Processor
}

func (SimpleRunner) Run

func (r SimpleRunner) Run(ctx context.Context, linters []Linter, lintCtx *golinters.Context) <-chan result.Issue

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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