Help us shape the future of Go! Take the 2026 Go Developer Survey

scip

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper interface {
	Bootstrap(ctx context.Context, req Request) error
}

Bootstrapper optionally prepares a driver before indexing starts.

type CommandDriver

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

func (*CommandDriver) Bootstrap

func (d *CommandDriver) Bootstrap(ctx context.Context, req Request) error

func (*CommandDriver) Index

func (d *CommandDriver) Index(ctx context.Context, req Request) (Result, error)

func (*CommandDriver) Language

func (d *CommandDriver) Language() string

func (*CommandDriver) Name

func (d *CommandDriver) Name() string

func (*CommandDriver) Supports

func (d *CommandDriver) Supports(repoRoot string) bool

type Driver

type Driver interface {
	Name() string
	Language() string
	Supports(repoRoot string) bool
	Index(ctx context.Context, req Request) (Result, error)
}

Driver defines the language-specific SCIP integration contract used by the graph-truth build pipeline.

func NewGoDriver

func NewGoDriver(runner Runner) Driver

func NewPythonDriver

func NewPythonDriver(runner Runner) Driver

func NewTypeScriptDriver

func NewTypeScriptDriver(runner Runner) Driver

type MissingBinaryError

type MissingBinaryError struct {
	Driver      string
	Command     string
	RepoRoot    string
	InstallHint string
	Cause       error
}

func (*MissingBinaryError) Error

func (e *MissingBinaryError) Error() string

func (*MissingBinaryError) Unwrap

func (e *MissingBinaryError) Unwrap() error

type Registry

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

Registry stores the available language-specific SCIP drivers behind one language-agnostic lookup surface.

func DefaultRegistry

func DefaultRegistry() (*Registry, error)

func NewRegistry

func NewRegistry(drivers ...Driver) (*Registry, error)

NewRegistry builds a registry from the supplied drivers.

func (*Registry) Bootstrap

func (r *Registry) Bootstrap(ctx context.Context, build types.BuildRequest) error

Bootstrap preflights resolved drivers before indexing starts.

func (*Registry) Driver

func (r *Registry) Driver(language string) (Driver, bool)

Driver returns the registered driver for a language, if any.

func (*Registry) Languages

func (r *Registry) Languages() []string

Languages returns the normalized registered languages in stable order.

func (*Registry) Register

func (r *Registry) Register(driver Driver) error

Register adds one driver keyed by normalized language.

func (*Registry) Resolve

func (r *Registry) Resolve(build types.BuildRequest) ([]Driver, error)

Resolve chooses the drivers to run for a build request. Explicitly requested languages are strict; repository-derived hints are best-effort.

type Request

type Request struct {
	RepoRoot   string
	Language   string
	OutputPath string
}

Request is the normalized input passed to a specific SCIP driver.

func (Request) Normalize

func (r Request) Normalize() Request

Normalize trims wire input and fills the default SCIP artifact path.

func (Request) Validate

func (r Request) Validate() error

Validate enforces the minimum contract every driver invocation needs.

type Result

type Result struct {
	Driver   string
	Language string
	Artifact string
	Facts    []types.Fact
}

Result captures the semantic facts produced by a driver run.

type Runner

type Runner interface {
	Run(ctx context.Context, dir string, name string, args ...string) error
}

Jump to

Keyboard shortcuts

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