Documentation
¶
Index ¶
- Constants
- type Config
- func (lc *Config) AllNames() []string
- func (lc *Config) ConsiderSlow() *Config
- func (lc *Config) IsSlowLinter() bool
- func (lc *Config) Name() string
- func (lc *Config) WithAlternativeNames(names ...string) *Config
- func (lc *Config) WithAutoFix() *Config
- func (lc *Config) WithChangeTypes() *Config
- func (lc *Config) WithLoadFiles() *Config
- func (lc *Config) WithLoadForGoAnalysis() *Config
- func (lc *Config) WithPresets(presets ...string) *Config
- func (lc *Config) WithURL(url string) *Config
- type Context
- type Linter
Constants ¶
View Source
const ( PresetFormatting = "format" PresetComplexity = "complexity" PresetStyle = "style" PresetBugs = "bugs" PresetUnused = "unused" PresetPerformance = "performance" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Linter Linter
EnabledByDefault bool
LoadMode packages.LoadMode
InPresets []string
AlternativeNames []string
OriginalURL string // URL of original (not forked) repo, needed for autogenerated README
CanAutoFix bool
IsSlow bool
DoesChangeTypes bool
}
func (*Config) ConsiderSlow ¶
func (*Config) IsSlowLinter ¶
func (*Config) WithAlternativeNames ¶
func (*Config) WithAutoFix ¶
func (*Config) WithChangeTypes ¶
func (*Config) WithLoadFiles ¶
func (*Config) WithLoadForGoAnalysis ¶
func (*Config) WithPresets ¶
type Context ¶
type Context struct {
// Packages are deduplicated (test and normal packages) packages
Packages []*packages.Package
// OriginalPackages aren't deduplicated: they contain both normal and test
// version for each of packages
OriginalPackages []*packages.Package
Cfg *config.Config
FileCache *fsutils.FileCache
LineCache *fsutils.LineCache
Log logutils.Log
PkgCache *pkgcache.Cache
LoadGuard *load.Guard
}
func (*Context) ClearTypesInPackages ¶
func (c *Context) ClearTypesInPackages()
func (*Context) Settings ¶
func (c *Context) Settings() *config.LintersSettings
Click to show internal directories.
Click to hide internal directories.