duplicate-modules
Duplicate files exist in multiple locations - likely from incomplete migration or copy-paste.
Applies to: Go, JavaScript, Python, Ruby, Rust, TypeScript
Why this matters
When the same file exists in multiple locations, changes to one copy don't update the other. This leads to subtle bugs when the copies drift apart, confusion about which is the 'source of truth', and wasted effort maintaining multiple versions. This commonly happens during monorepo migrations when old code isn't fully removed.
Catch it before it ships
pip install stablestack # or: npx stablestackstablestack # scans your project, STRUCT011 includedstablestack explain STRUCT011STRUCT011 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: STRUCT011
More Code Structure checks
multiple-classes-per-file
Multiple classes defined in a single file.
STRUCT003imports-in-function
Import statement inside a function instead of at module level.
STRUCT004sys-path-manipulation
Direct sys.path manipulation detected.
STRUCT005relative-imports
Relative import used instead of absolute import.
STRUCT006hasattr-getattr-pattern
Using hasattr/getattr for attribute access instead of proper typing.
STRUCT009class-filename-mismatch
Class name doesn't match filename convention.
STRUCT010mixed-frontend-backend
Frontend and backend code should be clearly separated
STRUCT012naked-functions
Too many loose functions - consider grouping into a class or service.