Skip to content

add UnreliableSubclasses cop with tests#443

Open
alexanderadam wants to merge 3 commits into
github:mainfrom
alexanderadam:feat/unreliable_subclasses_cop
Open

add UnreliableSubclasses cop with tests#443
alexanderadam wants to merge 3 commits into
github:mainfrom
alexanderadam:feat/unreliable_subclasses_cop

Conversation

@alexanderadam

@alexanderadam alexanderadam commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Hi @mattr-,

as requested this is the PR including the 👮‍♂️ cop.

It supersedes #356.

PS: I'm looking for a new adventure in case anybody is looking to hire someone or in case someone would like to work with a (Ruby/Rails/Crystal) dev and I'm also open to move to a PO/PM role.
PPS: If we ever ever meet, feel free to ask me about the Ruby conference guestbook

flags Class#descendants / Class#subclasses on constant (or self) receivers. skips non-constant receivers so tree-model #descendants don't false-positive.
register in default.yml + default_cops.yml as pending, require it from the top-level entry point.
include a 'good' example showing an explicit registry, plus pointers to eager loading and ActiveSupport::DescendantsTracker for cases where reflection is unavoidable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant