Documentation
¶
Overview ¶
Package reuse provides code reuse tracking and similarity detection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DuplicateGroup ¶
type DuplicateGroup struct {
Name string `json:"name"`
Nodes []string `json:"nodes"`
Packages []string `json:"packages"`
}
DuplicateGroup represents nodes with identical or near-identical names.
type RefactorCandidate ¶
type RefactorCandidate struct {
Type string `json:"type"`
Description string `json:"description"`
Nodes []string `json:"nodes"`
Suggestion string `json:"suggestion"`
Priority string `json:"priority"` // high, medium, low
}
RefactorCandidate suggests potential refactoring opportunities.
type ReuseReport ¶
type ReuseReport struct {
SimilarGroups []SimilarGroup `json:"similar_groups"`
DuplicateNames []DuplicateGroup `json:"duplicate_names"`
RefactorCandidates []RefactorCandidate `json:"refactor_candidates"`
Summary ReuseSummary `json:"summary"`
}
ReuseReport contains the analysis results.
type ReuseSummary ¶
type ReuseSummary struct {
TotalNodes int `json:"total_nodes"`
SimilarGroupCount int `json:"similar_group_count"`
DuplicateCount int `json:"duplicate_count"`
RefactorCandidates int `json:"refactor_candidates"`
}
ReuseSummary provides aggregate statistics.
type SharedDepGroup ¶
type SharedDepGroup struct {
}
SharedDepGroup represents nodes that share common dependencies.
type SimilarGroup ¶
type SimilarGroup struct {
Pattern string `json:"pattern"`
Description string `json:"description"`
Nodes []string `json:"nodes"`
Similarity float64 `json:"similarity"`
Type string `json:"type"`
}
SimilarGroup represents nodes with similar signatures or structure.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker identifies reusable code patterns and similar structures.
func NewTracker ¶
NewTracker creates a new reuse tracker.
func (*Tracker) Analyze ¶
func (t *Tracker) Analyze() *ReuseReport
Analyze performs the reuse analysis.
Click to show internal directories.
Click to hide internal directories.