linter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnknownType = linter.UnknownType

UnknownType is a special sentinel value that is returned from the CheckerContext.TypeOf method instead of the nil type. Deprecated: use linter.UnknownType.

Functions

This section is empty.

Types

type Checker

type Checker = linter.Checker

Checker is an implementation of a check that is described by the associated info. Deprecated: use linter.Checker.

func NewChecker

func NewChecker(ctx *Context, info *CheckerInfo) (*Checker, error)

NewChecker returns initialized checker identified by an info. info must be non-nil. Returns an error if info describes a checker that was not properly registered, or if checker fails to initialize. Deprecated: use linter.NewChecker.

type CheckerCollection

type CheckerCollection = linter.CheckerCollection

CheckerCollection provides additional information for a group of checkers. Deprecated: use linter.CheckerCollection.

type CheckerContext

type CheckerContext = linter.CheckerContext

CheckerContext is checker-local context copy. Fields that are not from Context itself are writeable. Deprecated: use linter.CheckerContext.

type CheckerInfo

type CheckerInfo = linter.CheckerInfo

CheckerInfo holds checker metadata and structured documentation. Deprecated: use linter.CheckerInfo.

func GetCheckersInfo

func GetCheckersInfo() []*CheckerInfo

GetCheckersInfo returns a checkers info list for all registered checkers. The slice is sorted by a checker name.

Info objects can be used to instantiate checkers with NewChecker function. Deprecated: use linter.GetCheckersInfo.

type CheckerParam

type CheckerParam = linter.CheckerParam

CheckerParam describes a single checker customizable parameter. Deprecated: use linter.CheckerParam.

type CheckerParams

type CheckerParams = linter.CheckerParams

CheckerParams holds all checker-specific parameters.

Provides convenient access to the loosely typed underlying map. Deprecated: use linter.CheckerParams.

type Context

type Context = linter.Context

Context is a readonly state shared among every checker. Deprecated: use linter.Context.

func NewContext

func NewContext(fset *token.FileSet, sizes types.Sizes) *Context

NewContext returns new shared context to be used by every checker.

All data carried by the context is readonly for checkers, but can be modified by the integrating application. Deprecated: use linter.NewContext.

type FileWalker

type FileWalker = linter.FileWalker

FileWalker is an interface every checker should implement.

The WalkFile method is executed for every Go file inside the package that is being checked. Deprecated: use linter.FileWalker.

type GoVersion deprecated added in v0.5.8

type GoVersion = linter.GoVersion

Deprecated: use linter.GoVersion.

func ParseGoVersion deprecated added in v0.6.2

func ParseGoVersion(version string) (GoVersion, error)

Deprecated: use linter.ParseGoVersion.

type QuickFix added in v0.5.8

type QuickFix = linter.QuickFix

QuickFix is our analysis.TextEdit; we're using it here to avoid direct analysis package dependency for now. Deprecated: use linter.QuickFix.

type Warning

type Warning = linter.Warning

Warning represents issue that is found by checker. Deprecated: use linter.Warning.

Jump to

Keyboard shortcuts

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