Skip to content

add UnreliableSubclasses cop with tests#443

Merged
mattr- merged 3 commits into
github:mainfrom
alexanderadam:feat/unreliable_subclasses_cop
Jul 13, 2026
Merged

add UnreliableSubclasses cop with tests#443
mattr- merged 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.
@ynumpnerc

This comment has been minimized.

@ynumpnerc

This comment has been minimized.

@mattr- mattr- merged commit 00c1bb1 into github:main Jul 13, 2026
6 checks passed
@mattr-

mattr- commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Thank you for the contribution! ❤️

@alexanderadam alexanderadam deleted the feat/unreliable_subclasses_cop branch July 13, 2026 18:06
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.

3 participants