fleetlint Policy for a fleet of repositories
v0.10
Getting started

quality/duplication-gate/any

Duplicated code is measured

The stack-neutral implementation of quality/duplication-gate: it checks stacks without an implementation of their own and repositories where no stack is detected, and its satisfiers count for every stack.

Severityinfo
Tiers1
Stacksany
Scoperoot
Kindoutcome
Sourcelibrary v0.7.0
Selected byfleetlint-recommended@v0.7.0

Requirement

jscpd, Simian or duplo runs in the task runner, the hooks or CI, or Sonar is configured (sonar-project.properties).

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

Enable dupl in .golangci.yml, or add jscpd to the lint target (see https://fleetlint.org/stacks/ for the stack’s tool).

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.

A finding of this rule points at the file taskrunner.file != "" ? taskrunner.file : "Makefile" yields.

Sources


Generated by fleetlint docs from catalog v0.7.0.