config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSmallScopeMax       = 7
	DefaultSmallVarnameMax     = -1
	DefaultMediumScopeMax      = 15
	DefaultMediumVarnameMax    = -1
	DefaultLargeScopeMax       = 25
	DefaultLargeVarnameMax     = -1
	DefaultVeryLargeVarnameMax = -1
	DefaultReceiverNameMax     = 2
)

Variables

View Source
var Loader = &analysis.Analyzer{
	Name:       name,
	Doc:        doc,
	Run:        run,
	Requires:   []*analysis.Analyzer{},
	ResultType: reflect.TypeOf((*Config)(nil)),
}

Functions

This section is empty.

Types

type Analyzers

type Analyzers struct {
	Disable []string `yaml:"disable"`
}

type AnalyzersSettings added in v0.7.1

type AnalyzersSettings struct {
	Contexts     Contexts     `yaml:"contexts"`
	Dontpanic    Dontpanic    `yaml:"dontpanic"`
	Errorstrings Errorstrings `yaml:"errorstrings"`
	Funcfmt      Funcfmt      `yaml:"funcfmt"`
	Getters      Getters      `yaml:"getters"`
	Handlerrors  Handlerrors  `yaml:"handlerrors"`
	Ifacenames   Ifacenames   `yaml:"ifacenames"`
	Mixedcaps    Mixedcaps    `yaml:"mixedcaps"`
	Nilslices    Nilslices    `yaml:"nilslices"`
	Pkgnames     Pkgnames     `yaml:"pkgnames"`
	Recvnames    Recvnames    `yaml:"recvnames"`
	Recvtype     Recvtype     `yaml:"recvtype"`
	Repetition   Repetition   `yaml:"repetition"`
	Typealiases  Typealiases  `yaml:"typealiases"`
	Underscores  Underscores  `yaml:"underscores"`
	Useany       Useany       `yaml:"useany"`
	Useq         Useq         `yaml:"useq"`
	Varnames     Varnames     `yaml:"varnames"`
}

type Config

type Config struct {
	Analyzers         Analyzers         `yaml:"analyzers"`
	AnalyzersSettings AnalyzersSettings `yaml:"analyzers-settings"`
	ExcludeFiles      []string          `yaml:"exclude-files"`
	ConfigDir         string            `yaml:"-"`
	// contains filtered or unexported fields
}

func Load

func Load(pass *analysis.Pass) (*Config, error)

func (*Config) IsDisabled

func (c *Config) IsDisabled(name string) bool

type Contexts added in v0.17.0

type Contexts struct {
	IncludeGenerated bool `yaml:"include-generated"`
	ExcludeTest      bool `yaml:"exclude-test"`
}

type Dontpanic added in v0.15.0

type Dontpanic struct {
	IncludeGenerated bool `yaml:"include-generated"`
	ExcludeTest      bool `yaml:"exclude-test"`
}

type Errorstrings added in v0.14.0

type Errorstrings struct {
	IncludeGenerated bool `yaml:"include-generated"`
	ExcludeTest      bool `yaml:"exclude-test"`
}

type Funcfmt added in v0.18.0

type Funcfmt struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Getters added in v0.10.0

type Getters struct {
	Exclude          []string `yaml:"exclude"`
	IncludeGenerated bool     `yaml:"include-generated"`
}

type Handlerrors added in v0.16.0

type Handlerrors struct {
	IncludeGenerated bool `yaml:"include-generated"`
	ExcludeTest      bool `yaml:"exclude-test"`
}

type Ifacenames

type Ifacenames struct {
	All              bool `yaml:"all"`
	IncludeGenerated bool `yaml:"include-generated"`
}

type Mixedcaps

type Mixedcaps struct {
	Exclude          []string `yaml:"exclude"`
	IncludeGenerated bool     `yaml:"include-generated"`
}

type Nilslices added in v0.9.0

type Nilslices struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Pkgnames

type Pkgnames struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Recvnames

type Recvnames struct {
	IncludeGenerated bool `yaml:"include-generated"`
	Max              int  `yaml:"max"`
}

type Recvtype added in v0.11.0

type Recvtype struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Repetition added in v0.8.0

type Repetition struct {
	Exclude          []string `yaml:"exclude"`
	IncludeGenerated bool     `yaml:"include-generated"`
}

type Typealiases added in v0.12.0

type Typealiases struct {
	Exclude          []string `yaml:"exclude"`
	IncludeGenerated bool     `yaml:"include-generated"`
}

type Underscores

type Underscores struct {
	Exclude          []string `yaml:"exclude"`
	IncludeGenerated bool     `yaml:"include-generated"`
}

type Useany added in v0.13.0

type Useany struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Useq added in v0.12.0

type Useq struct {
	IncludeGenerated bool `yaml:"include-generated"`
}

type Varnames added in v0.7.0

type Varnames struct {
	Exclude             []string `yaml:"exclude"`
	IncludeGenerated    bool     `yaml:"include-generated"`
	SmallScopeMax       int      `yaml:"small-scope-max"`
	SmallVarnameMax     int      `yaml:"small-varname-max"`
	MediumScopeMax      int      `yaml:"medium-scope-max"`
	MediumVarnameMax    int      `yaml:"medium-varname-max"`
	LargeScopeMax       int      `yaml:"large-scope-max"`
	LargeVarnameMax     int      `yaml:"large-varname-max"`
	VeryLargeVarnameMax int      `yaml:"very-large-varname-max"`
}

Jump to

Keyboard shortcuts

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