buildutil

package
v0.0.0-...-1b6ad0c Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyNoImports

func VerifyNoImports(
	t testing.TB,
	pkgPath string,
	cgo bool,
	forbiddenPkgs, forbiddenPrefixes []string,
	allowlist ...string,
)

VerifyNoImports verifies that a package doesn't depend (directly or indirectly) on forbidden packages. The forbidden packages are specified as either exact matches or prefix matches. A match is not reported if the package that includes the forbidden package is listed in the allowlist. If GOPATH isn't set, it is an indication that the source is not available and the test is skipped.

func VerifyTransitiveAllowlist

func VerifyTransitiveAllowlist(t testing.TB, pkg string, allowedPkgs []string)

VerifyTransitiveAllowlist checks that the entire set of transitive dependencies of the given package is in a allowlist. Vendored and stdlib packages are always allowed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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