pipeline

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeCoupling added in v0.1.3

type ChangeCoupling struct {
	FileA         string
	FileB         string
	CoChangeCount int
	TotalChangesA int
	TotalChangesB int
	CouplingScore float64
}

ChangeCoupling represents a pair of files that change together.

type CommitFiles added in v0.1.3

type CommitFiles struct {
	Hash  string
	Files []string
}

CommitFiles holds the files changed in a single commit.

type EnvBinding added in v0.1.0

type EnvBinding struct {
	Key      string
	Value    string
	FilePath string // relative path where found
}

EnvBinding represents an extracted environment variable with a URL value.

func ScanProjectEnvURLs added in v0.1.0

func ScanProjectEnvURLs(rootPath string) []EnvBinding

ScanProjectEnvURLs walks the project root, scanning all non-ignored files for env var assignments where the value looks like a URL.

type FunctionRegistry

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

FunctionRegistry indexes all Function, Method, and Class nodes by qualified name and simple name for fast call resolution.

func NewFunctionRegistry

func NewFunctionRegistry() *FunctionRegistry

NewFunctionRegistry creates an empty registry.

func (*FunctionRegistry) Exists added in v0.1.4

func (r *FunctionRegistry) Exists(qualifiedName string) bool

Exists returns true if a qualified name is registered. Uses RLock for concurrent read safety.

func (*FunctionRegistry) FindByName

func (r *FunctionRegistry) FindByName(name string) []string

FindByName returns all qualified names with the given simple name.

func (*FunctionRegistry) FindEndingWith

func (r *FunctionRegistry) FindEndingWith(suffix string) []string

FindEndingWith returns all qualified names ending with ".suffix".

func (*FunctionRegistry) FuzzyResolve added in v0.1.3

func (r *FunctionRegistry) FuzzyResolve(calleeName, moduleQN string) (string, bool)

FuzzyResolve attempts a loose match when Resolve() returns "". It searches for any registered function whose simple name matches the callee's last name segment. Returns the best match (by import distance) and true, or "" and false if no match is found.

Unlike Resolve(), this does not require prefix/import agreement — it purely matches on the function name. Results should be marked as "fuzzy" resolution.

func (*FunctionRegistry) LabelOf added in v0.2.0

func (r *FunctionRegistry) LabelOf(qualifiedName string) string

LabelOf returns the node label for a qualified name, or "" if not registered.

func (*FunctionRegistry) Register

func (r *FunctionRegistry) Register(name, qualifiedName, nodeLabel string)

Register adds a node to the registry.

func (*FunctionRegistry) Resolve

func (r *FunctionRegistry) Resolve(calleeName, moduleQN string, importMap map[string]string) string

Resolve attempts to find the qualified name of a callee using a prioritized resolution strategy:

  1. Import map lookup
  2. Same-module match
  3. Project-wide single match by simple name
  4. Suffix match with import distance scoring

func (*FunctionRegistry) Size

func (r *FunctionRegistry) Size() int

Size returns the number of entries in the registry.

type Pipeline

type Pipeline struct {
	Store       *store.Store
	RepoPath    string
	ProjectName string
	// contains filtered or unexported fields
}

Pipeline orchestrates the 3-pass indexing of a repository.

func New

func New(s *store.Store, repoPath string) *Pipeline

New creates a new Pipeline.

func (*Pipeline) Run

func (p *Pipeline) Run() error

Run executes the full 3-pass pipeline within a single transaction. If file hashes from a previous run exist, only changed files are re-processed.

type TypeMap

type TypeMap map[string]string

TypeMap tracks variable names to their inferred class/type qualified names. Key: variable name, Value: class/type QN in the registry.

Jump to

Keyboard shortcuts

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