-
Notifications
You must be signed in to change notification settings - Fork 15
Open
0 / 20 of 2 issues completedDescription
Analysis of commit 2ccc405
Summary
Semantic analysis of the Go codebase found 2 significant duplication patterns meeting the reporting threshold (>10 lines or 3+ similar patterns). Both are in core packages and affect maintainability.
Detected Patterns
- Case-Insensitive String Slice Normalization — Severity: Medium — See sub-issue [duplicate-code] Duplicate Code Pattern: Case-Insensitive String Slice Normalization in guard_policy.go #2258
- SecrecyLabel / IntegrityLabel Parallel Structure — Severity: Low — See sub-issue [duplicate-code] Duplicate Code Pattern: SecrecyLabel/IntegrityLabel Parallel Wrapper Structure in difc/labels.go #2259
Overall Impact
- Total Duplicated Lines: ~40 lines across both patterns
- Affected Files: 2 (
internal/config/guard_policy.go,internal/difc/labels.go) - Maintainability Risk: Medium — bug fixes in normalisation logic need to be applied in multiple places
- Refactoring Priority: Low-to-Medium — both are self-contained and low-risk to fix
Next Steps
- Review individual pattern sub-issues for detailed analysis
- Prioritize the
guard_policy.gonormalisation extraction (pattern Configure as a Go CLI tool #1) — highest ROI - Consider the DIFC label wrapper pattern only if new label types are planned
Analysis Metadata
- Analyzed Files: ~55 non-test Go files in
internal/ - Detection Method: Semantic code analysis (symbol/pattern search)
- Commit:
2ccc4055bb9a9a7b51c8d326d9242ae81ecf484a - Analysis Date: 2026-03-21
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.