bandeps

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	// Check runs bandeps in the current directory with the configuration.
	Check(
		ctx context.Context,
		envStdioContainer app.EnvStdioContainer,
		externalConfig ExternalConfig,
	) ([]Violation, error)
}

Checker is a checker.

func NewChecker

func NewChecker(logger *zap.Logger, runner command.Runner) Checker

type ExternalBanConfig

type ExternalBanConfig struct {
	// Packages are the package expressions to get dependencies for.
	Packages ExternalPackageConfig `json:"packages,omitempty" yaml:"packages,omitempty"`
	// Deps are package expressions that cannot be depended on for Packages.
	Deps ExternalPackageConfig `json:"deps,omitempty" yaml:"deps,omitempty"`
	// Note is a note to print out regarding why this ban exists.
	Note string `json:"note,omitempty" yaml:"note,omitempty"`
}

ExternalConfig is an external ban configuation.

type ExternalConfig

type ExternalConfig struct {
	Bans []ExternalBanConfig `json:"bans,omitempty" yaml:"bans,omitempty"`
}

ExternalConfig is an external configuation.

type ExternalPackageConfig

type ExternalPackageConfig struct {
	// Use are the package expressions to list with go list.
	Use []string `json:"use,omitempty" yaml:"use,omitempty"`
	// Except are the package expressions that should be excluded from Use.
	Except []string `json:"except,omitempty" yaml:"except,omitempty"`
}

type Violation

type Violation interface {
	fmt.Stringer

	Package() string
	Dep() string
	Note() string
	// contains filtered or unexported methods
}

Violation is a violation.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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