Documentation
¶
Index ¶
- Constants
- type Config
- func (lc *Config) AllNames() []string
- func (lc *Config) ConsiderSlow() *Config
- func (lc *Config) GetSpeed() int
- 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) WithLoadDepsTypeInfo() *Config
- func (lc *Config) WithLoadFiles() *Config
- func (lc *Config) WithLoadForGoAnalysis() *Config
- func (lc *Config) WithLoadTypeInfo() *Config
- func (lc *Config) WithParent(parentLinterName string) *Config
- func (lc *Config) WithPresets(presets ...string) *Config
- func (lc *Config) WithSSA() *Config
- func (lc *Config) WithSpeed(speed int) *Config
- func (lc *Config) WithURL(url string) *Config
- type Context
- type Linter
- type MetaLinter
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
NeedsSSARepr bool
InPresets []string
Speed int // more value means faster execution of linter
AlternativeNames []string
OriginalURL string // URL of original (not forked) repo, needed for autogenerated README
ParentLinterName string // used only for megacheck's children now
CanAutoFix bool
IsSlow bool
}
func (*Config) ConsiderSlow ¶ added in v1.19.0
func (*Config) IsSlowLinter ¶ added in v1.19.0
func (*Config) WithAlternativeNames ¶ added in v1.10.2
func (*Config) WithAutoFix ¶ added in v1.15.0
func (*Config) WithLoadDepsTypeInfo ¶ added in v1.19.0
func (*Config) WithLoadFiles ¶ added in v1.19.0
func (*Config) WithLoadForGoAnalysis ¶ added in v1.19.0
func (*Config) WithLoadTypeInfo ¶ added in v1.19.0
func (*Config) WithParent ¶ added in v1.13.1
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
NotCompilingPackages []*packages.Package
LoaderConfig *loader.Config // deprecated, don't use for new linters
Program *loader.Program // deprecated, use Packages for new linters
SSAProgram *ssa.Program // for unparam and interfacer but not for megacheck (it change it)
Cfg *config.Config
ASTCache *astcache.Cache
FileCache *fsutils.FileCache
LineCache *fsutils.LineCache
Log logutils.Log
PkgCache *pkgcache.Cache
LoadGuard *load.Guard
NeedWholeProgram bool
}
func (*Context) Settings ¶
func (c *Context) Settings() *config.LintersSettings
Click to show internal directories.
Click to hide internal directories.