check

package
Version: v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandName = "check"
)

Variables

This section is empty.

Functions

func CheckDependencyVersion

func CheckDependencyVersion(providerPath, modPath, constaint string) (string, bool, error)

func CheckForGoModules

func CheckForGoModules(providerPath string) (usingModules bool)

func CheckGoVersion

func CheckGoVersion(providerPath string) (goVersion string, satisfiesConstraint bool)

func CheckSDKPackageImports

func CheckSDKPackageImports(details *ProviderImportDetails) ([]string, error)

func CommandFactory

func CommandFactory(ui cli.Ui) func() (cli.Command, error)

func ReadVersionFromModFile

func ReadVersionFromModFile(path, dependencyPath string) (*version.Version, error)

func RunCheck

func RunCheck(ui cli.Ui, providerPath, repoName string) error

Types

type AlreadyMigrated

type AlreadyMigrated struct {
	// contains filtered or unexported fields
}

func (*AlreadyMigrated) Error

func (am *AlreadyMigrated) Error() string

type Offence

type Offence struct {
	IdentDeprecation *identDeprecation
	Positions        []*token.Position
}

func CheckSDKPackageImportsAndRefs

func CheckSDKPackageImportsAndRefs(providerPath string) (removedPackagesInUse []string, packageRefsOffences []*Offence, err error)

func CheckSDKPackageRefs

func CheckSDKPackageRefs(providerImportDetails *ProviderImportDetails) ([]*Offence, error)

type ProviderImportDetails

type ProviderImportDetails struct {
	AllImportPathsHash map[string]bool
	Packages           map[string]ProviderPackage
}

ProviderImports is a data structure we parse the `go list` output into for efficient searching

func GoListPackageImports

func GoListPackageImports(providerPath string) (*ProviderImportDetails, error)

type ProviderPackage

type ProviderPackage struct {
	Dir         string
	ImportPath  string
	GoFiles     []string
	TestGoFiles []string
	Imports     []string
	TestImports []string
}

Jump to

Keyboard shortcuts

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