quality/duplication-gate/python
Duplicated code is measured
Implements quality/duplication-gate for python.
| Severity | info |
| Tiers | 1 |
| Stacks | python |
| Scope | root |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
pylint runs with duplicate-code (R0801) not disabled; 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
Run pylint in the lint target without disabling duplicate-code, or add jscpd.
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.
Sources
- https://fleetlint.org/baseline/#design (convention)
- https://pylint.readthedocs.io/en/stable/user_guide/messages/refactor/duplicate-code.html (check, R0801)
- https://fleetlint.org/stacks/#python
Generated by fleetlint docs from catalog v0.8.0.