acceptlist

package
v0.0.0-...-c7609e9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreCall

func IgnoreCall(pr *packid.PackageResolver, callExpr *ast.CallExpr, stack []ast.Node) bool

IgnoreCall returns true iff the provided callExpr matches the package of a whitelisted call.

func LoadAcceptList

func LoadAcceptList(path string) error

LoadAcceptList loads the accept list from the provided file path. If any errors occur, they are returned.

Types

type AcceptList

type AcceptList struct {
	Accept map[string]map[string]struct{}
}

AcceptList stores a list of functions from third-party packages which are known not to start any Goroutines or store a reference to any of their pointer arguments.

var GlobalAcceptList *AcceptList

GlobalAcceptList stores the list of well-known third-party functions which can be ignored by analyzers. If the function is nil, no accept list is set.

func AcceptListFromFile

func AcceptListFromFile(path string) (AcceptList, error)

AcceptListFromFile reads in the accept list from the provided file.

func UnmarshalAcceptList

func UnmarshalAcceptList(data []byte) (AcceptList, error)

UnmarshalAcceptList unmarshals an AcceptList from a yaml file.

Jump to

Keyboard shortcuts

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