errorlint

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 11 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LintErrorComparisons

func LintErrorComparisons(info *TypesInfoExt) []analysis.Diagnostic

func LintErrorTypeAssertions

func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis.Diagnostic

func LintFmtErrorfCalls

func LintFmtErrorfCalls(fset *token.FileSet, info types.Info, multipleWraps bool) []analysis.Diagnostic

func NewAnalyzer

func NewAnalyzer() *analysis.Analyzer

Types

type ByPosition

type ByPosition []analysis.Diagnostic

func (ByPosition) Len

func (l ByPosition) Len() int

func (ByPosition) Less

func (l ByPosition) Less(i, j int) bool

func (ByPosition) Swap

func (l ByPosition) Swap(i, j int)

type TypesInfoExt

type TypesInfoExt struct {
	*analysis.Pass

	// Maps AST nodes back to the node they are contained within.
	NodeParent map[ast.Node]ast.Node

	// Maps an object back to all identifiers to refer to it.
	IdentifiersForObject map[types.Object][]*ast.Ident
}

func (*TypesInfoExt) ContainingFuncDecl added in v1.0.3

func (info *TypesInfoExt) ContainingFuncDecl(node ast.Node) *ast.FuncDecl

Jump to

Keyboard shortcuts

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