You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This analysis identified 1 significant duplication pattern in the internal/difc/ package: the Label and Capabilities types share nearly identical concurrent tag-set mutation methods backed by the same underlying data structure (map[Tag]struct{} + sync.RWMutex). This results in ~25 duplicated lines across 5 methods.
Analysis of commit 16ac464
Summary
This analysis identified 1 significant duplication pattern in the
internal/difc/package: theLabelandCapabilitiestypes share nearly identical concurrent tag-set mutation methods backed by the same underlying data structure (map[Tag]struct{}+sync.RWMutex). This results in ~25 duplicated lines across 5 methods.Detected Patterns
LabelandCapabilities— Severity: Medium — See sub-issue [duplicate-code] Duplicate Code Pattern: Concurrent tag-set methods in Label and Capabilities #8772Overall Impact
internal/difc/capabilities.go,internal/difc/labels.go)Next Steps
tagSettype or embeddingLabelinsideCapabilitiesCapabilitiesmethods can simply delegate to an innerLabelAnalysis Metadata
internal/difc/capabilities.go); cross-referenced withinternal/difc/labels.gointernal/difc/