Skip to content

fix: exclude controller concerns from extraction and handle :: superclass - #28

Merged
kanehooper merged 2 commits into
mainfrom
fix/controller-concerns-and-superclass
Apr 6, 2026
Merged

kanehooper merged 2 commits into
mainfrom
fix/controller-concerns-and-superclass

Conversation

@kanehooper

Copy link
Copy Markdown
Contributor

What

Two fixes for the get_controller tool:

  1. Controller concern FPs: Files in app/controllers/concerns/ were classified as controllers
  2. :: prefix on superclass: Controller class declarations with :: prefix on superclass failed to extract

Testing

  • Added 4 new tests
  • All 1693 tests pass
  • Eval: get_controller mean composite 0.999 → 1.000 (6 apps, 164 controllers)

- Scanner should classify app/controllers/concerns/ as design_patterns, not controllers
- Controller pattern should handle :: prefix on superclass (e.g. ::Spree::Api::V2::BaseController)
- 4 new tests: 2 scanner, 1 pattern, 1 extractor integration
…e :: superclass

- Scanner now classifies app/controllers/concerns/ as design_patterns (cat 26)
  before the broad controllers rule, preventing concern modules from being
  indexed as controllers
- Controller classDeclaration pattern now handles optional :: prefix on
  superclass (e.g. ::Spree::Api::V2::BaseController)
- Eval: get_controller mean composite 1.000 across 6 apps (164 controllers)
@kanehooper
kanehooper merged commit ee622a7 into main Apr 6, 2026
0 of 3 checks passed
@kanehooper
kanehooper deleted the fix/controller-concerns-and-superclass branch April 6, 2026 00:40
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