linters

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorsAsAnalyzer = &analysis.Analyzer{
	Name:     "errorsAs",
	Doc:      "reports illegal calls to errors.As and pkg/errors.As",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      runErrorsAs,
}

ErrorsAsAnalyzer adapted from go/x/tools https://cs.opensource.google/go/x/tools/+/refs/tags/v0.14.0:go/analysis/passes/errorsas/errorsas.go

View Source
var ErrorsStackAnalyzer = &analysis.Analyzer{
	Name:     "errors_stack",
	Doc:      "check that errors from external packages are wrapped with stacktrace",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      runErrorsStack,
}

Functions

func Imports

func Imports(pkg *types.Package, path string) bool

Imports a utility method that returns true if path is imported by pkg. borrowed from https://cs.opensource.google/go/x/tools/+/master:go/analysis/passes/internal/analysisutil/util.go;l=102

Types

This section is empty.

Jump to

Keyboard shortcuts

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