quality/duplication-gate/go
Duplicated code is measured
Implements quality/duplication-gate for go.
| Severity | info |
| Tiers | 1 |
| Stacks | go |
| Scope | root |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
golangci-lint has dupl enabled (in enable, or default: all) and not in disable; or a stack-neutral detector.
Why
Near-duplicate implementations are how a fix lands in one copy and not the other; a detector makes the second copy visible at review time.
Fix
Add dupl to linters.enable in .golangci.yml.
Agent instruction (from quality/duplication-gate): Add the stack’s duplication detector to the lint target with a threshold, and remove or merge the duplicates it reports rather than raising the threshold.
A finding that names no file points at .golangci.yml.
Sources
- https://fleetlint.org/baseline/#design (convention)
- https://golangci-lint.run/docs/linters/configuration/ (check, dupl)
- https://fleetlint.org/stacks/#go
Generated by fleetlint docs from catalog v0.8.0.