config

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

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

Functions

func NewTypesConfig added in v0.7.1

func NewTypesConfig(pass *analysis.Pass) (types.Config, error)

Types

type Analyzers

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

type AnalyzersSettings added in v0.7.1

type AnalyzersSettings struct {
	Getters     Getters     `yaml:"getters"`
	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"`
	// 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 Getters added in v0.10.0

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

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"`
}

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