depcheck

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsVariable

func ContainsVariable(s string) bool

func IsPackageLauncher

func IsPackageLauncher(argv []string) bool

IsPackageLauncher reports whether argv[0] is a documented or related package launcher. Unknown host binaries are not package selectors.

Types

type Kind

type Kind string

Kind identifies the selector family a classifier result applies to.

const (
	KindImage Kind = "image"
	KindNPM   Kind = "npm"
	KindPyPI  Kind = "pypi"
	KindNone  Kind = "none"
)

type Result

type Result struct {
	Kind   Kind
	Status Status
	Reason string
}

Result is a pure classification of one literal selector. It never includes the selector text, command arguments, or credential material.

func ClassifyCommand

func ClassifyCommand(argv []string) Result

ClassifyCommand classifies a bounded npx or uvx argv. Other wrappers, unsupported options, local paths, and dynamic commands are not assessed.

func ClassifyImage

func ClassifyImage(selector string) Result

ClassifyImage classifies a literal OCI image reference. Version tags, including exact-looking tags and an absent tag, are mutable without a digest. A syntactically valid digest is content-addressed, not publisher-verified.

type Status

type Status string

Status is the complete-assessment outcome of a literal selector.

Policy callers must treat StatusNotAssessed as unknown and must not accept it. Advisory validation maps that status to informational reference-not-assessed findings and must not turn it into a structural error or a policy rejection.

const (
	StatusMutable     Status = "mutable"
	StatusPinned      Status = "pinned"
	StatusNotAssessed Status = "not-assessed"
)

Jump to

Keyboard shortcuts

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