fleetlint Policy for a fleet of repositories
v0.11 (latest)
Getting started

quality/duplication-gate

Duplicated code is measured

A capability: each stack checks it with its own tools, and every implementation that runs must pass. Implemented for any, go, java, kotlin, python.

Severityinfo
Tiers1
Stacksany
Scoperoot
Kindcapability
Sourcelibrary v0.8.0
Selected byfleetlint-recommended@v0.8.0

Requirement

A duplication detector runs in the task runner, the hooks or CI and is not switched off: the stack’s own (golangci-lint dupl, pylint duplicate-code, PMD CPD) or a stack-neutral one (jscpd, Simian, duplo, Sonar). Another tool is added with accept:.

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 the stack’s duplication detector (see https://fleetlint.org/stacks/), or jscpd for any stack, to the lint target.

Agent instruction: 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.

Sources


Generated by fleetlint docs from catalog v0.8.0.