analyzer

package
v0.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

func New

func New() *Analyzer

func (*Analyzer) AnalyzeCommit

func (a *Analyzer) AnalyzeCommit(commit *object.Commit, previousSnapshot Snapshot) (*Result, error)

func (*Analyzer) BlobCacheLen added in v0.14.0

func (a *Analyzer) BlobCacheLen() int

BlobCacheLen returns the current number of entries in the blob cache.

func (*Analyzer) ClearBlobCache added in v0.14.0

func (a *Analyzer) ClearBlobCache()

ClearBlobCache replaces the blobCache with a fresh empty map, allowing the GC to reclaim all cached parse results.

func (*Analyzer) ClearDiffCache added in v0.15.0

func (a *Analyzer) ClearDiffCache()

ClearDiffCache replaces the diffCache with a fresh empty map, allowing the GC to reclaim all cached diff entries.

func (*Analyzer) DependenciesAtCommit

func (a *Analyzer) DependenciesAtCommit(commit *object.Commit) ([]Change, error)

func (*Analyzer) DependenciesInWorkingDir added in v0.11.0

func (a *Analyzer) DependenciesInWorkingDir(root string, includeSubmodules bool) ([]Change, error)

func (*Analyzer) DiffCacheLen added in v0.14.0

func (a *Analyzer) DiffCacheLen() int

DiffCacheLen returns the current number of entries in the diff cache.

func (*Analyzer) PrefetchDiffs

func (a *Analyzer) PrefetchDiffs(hashes []plumbing.Hash, numWorkers int)

PrefetchDiffs pre-computes diffs for all commits using a single git log command. Output is streamed via StdoutPipe so the raw git output is never held in memory.

func (*Analyzer) SetRepoPath

func (a *Analyzer) SetRepoPath(path string)

SetRepoPath sets the repository path for git shell commands.

type Change

type Change struct {
	ManifestPath        string
	Ecosystem           string
	Kind                string
	Name                string
	PURL                string
	ChangeType          string // "added", "modified", "removed"
	Requirement         string
	PreviousRequirement string
	DependencyType      string
	Integrity           string
}

type Result

type Result struct {
	Changes  []Change
	Snapshot Snapshot
}

type Snapshot

type Snapshot map[SnapshotKey]SnapshotEntry

type SnapshotEntry

type SnapshotEntry struct {
	Ecosystem      string
	Kind           string
	PURL           string
	Requirement    string
	DependencyType string
	Integrity      string
}

type SnapshotKey

type SnapshotKey struct {
	ManifestPath string
	Name         string
	Requirement  string
}

Jump to

Keyboard shortcuts

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