QUAL019warningPro

duplicate-code-blocks

Near-identical function/component exists in another file — extract to shared module.

Applies to: Project-level

Why this matters

When the same large function or component is copy-pasted across files, changes to one copy don't update the other. Over time the copies drift apart, leading to subtle inconsistencies and doubled maintenance effort. Extract the shared logic into a common module and import from there.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, QUAL019 includedstablestack explain QUAL019

QUAL019 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: QUAL019