Documentation
¶
Overview ¶
Package diff computes package/dependency/symbol/position diffs between two analyzer snapshots.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyDiff ¶
type DependencyDiff struct {
Package string `json:"Package"`
DiffType Type `json:"DiffType"`
Symbols []SymbolDiff `json:"Symbols"`
}
DependencyDiff represents a dependency edge diff between two packages.
func CouplingStats ¶
func CouplingStats(prev, curr analyzer.PackageCouplingStats) []DependencyDiff
CouplingStats compares two PackageCouplingStats and returns dependency-level diffs.
type PackageDiff ¶
type PackageDiff struct {
Package string `json:"Package"`
DiffType Type `json:"DiffType"` // Added/Removed/Unchanged at the package level
InwardDiff []DependencyDiff `json:"InwardDiff"`
OutwardDiff []DependencyDiff `json:"OutwardDiff"`
}
PackageDiff represents the diff for a single package between two snapshots.
func AllPackages ¶
func AllPackages(prev, curr []analyzer.Metrics) []PackageDiff
AllPackages compares two full snapshots (all packages across all languages) and returns diffs for every package that changed.
func PackageMetrics ¶
func PackageMetrics(prev, curr *analyzer.Metrics) *PackageDiff
PackageMetrics compares two full Metrics snapshots for a single package. Either prev or curr may be nil (indicating the package was added or removed).
type PositionDiff ¶
type PositionDiff struct {
Position analyzer.Position `json:"Position"`
DiffType Type `json:"DiffType"`
}
PositionDiff represents a position-level diff.
func Positions ¶
func Positions(prev, curr []analyzer.Position) []PositionDiff
Positions compares two position slices and returns position-level diffs. Positions are matched by file:line (columns are ignored for matching).
type SymbolDiff ¶
type SymbolDiff struct {
Name string `json:"Name"`
DiffType Type `json:"DiffType"`
PrevCount uint `json:"PrevCount"`
CurrCount uint `json:"CurrCount"`
Positions []PositionDiff `json:"Positions"`
}
SymbolDiff represents a symbol-level diff within a dependency edge.
func Symbols ¶
func Symbols(prev, curr analyzer.CouplingStats) []SymbolDiff
Symbols compares two CouplingStats and returns symbol-level diffs.