Documentation
¶
Overview ¶
Package plumbing defines shared types, constants, and test helpers for the analysis pipeline.
Index ¶
- Constants
- Variables
- func GetCommitsByTick(facts map[string]any) (map[int][]gitlib.Hash, bool)
- func GetPeopleCount(facts map[string]any) (int, bool)
- func GetReversedPeopleDict(facts map[string]any) ([]string, bool)
- func GetTickSize(facts map[string]any) (time.Duration, bool)
- type CachedBlob
- type FileDiffData
- type LineStats
Constants ¶
View Source
const ( // DependencyFileDiff is the name of the dependency provided by FileDiff. DependencyFileDiff = "file_diff" // DependencyTreeChanges is the name of the dependency provided by TreeDiff. DependencyTreeChanges = "changes" // DependencyTick is the name of the dependency which DaysSinceStart provides - the number // of ticks since the first commit in the analyzed sequence. DependencyTick = "tick" // FactCommitsByTick contains the mapping between day indices and the corresponding commits. FactCommitsByTick = "TicksSinceStart.Commits" // FactTickSize contains the [time.Duration] of each tick. FactTickSize = "TicksSinceStart.TickSize" // DependencyBlobCache identifies the dependency provided by BlobCache. DependencyBlobCache = "blob_cache" // DependencyLanguages is the name of the dependency provided by LanguagesDetection. DependencyLanguages = "languages" // DependencyLineStats is the identifier of the data provided by LinesStatsCalculator - line // statistics for each file in the commit. DependencyLineStats = "line_stats" )
Variables ¶
View Source
var ErrBinary = gitlib.ErrBinary
ErrBinary is raised in CachedBlob.CountLines() if the file is binary.
Functions ¶
func GetCommitsByTick ¶
GetCommitsByTick extracts the commits-by-tick mapping from the facts map.
func GetPeopleCount ¶
GetPeopleCount extracts the unique author count from the facts map.
func GetReversedPeopleDict ¶
GetReversedPeopleDict extracts the reversed people dictionary from the facts map.
Types ¶
type CachedBlob ¶
type CachedBlob = gitlib.CachedBlob
CachedBlob is an alias for gitlib.CachedBlob for backward compatibility.
type FileDiffData ¶
type FileDiffData struct {
Diffs []diffmatchpatch.Diff
OldLinesOfCode int
NewLinesOfCode int
}
FileDiffData is the type of the dependency provided by FileDiff.
type LineStats ¶
type LineStats struct {
// Added is the number of added lines by a particular developer in a particular day.
Added int `json:"added" yaml:"added"`
// Removed is the number of removed lines by a particular developer in a particular day.
Removed int `json:"removed" yaml:"removed"`
// Changed is the number of changed lines by a particular developer in a particular day.
Changed int `json:"changed" yaml:"changed"`
}
LineStats holds the numbers of inserted, deleted and changed lines.
Click to show internal directories.
Click to hide internal directories.