Class: Shirobai::Cop::Rails::IndexBy
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- Shirobai::Cop::Rails::IndexBy
- Extended by:
- RuboCop::Cop::AutoCorrector
- Includes:
- IndexMethodSupport
- Defined in:
- lib/shirobai/cop/rails/index_by.rb
Overview
Drop-in Rust-backed reimplementation of Rails/IndexBy
(rubocop-rails 2.35.5), Architecture B.
Rust nominates the four transform-to-hash candidate shapes on the shared
walk; IndexMethodSupport relocates each parser node and runs stock's
IndexMethod detection + autocorrect VERBATIM. The def_node_matcher
patterns and new_method_name below are copied unchanged from stock, so
the key-transform (value == element) matching, the ignore_node
cross-offense state and the byte-exact autocorrect are all stock's own.
Class Method Summary collapse
- .badge ⇒ Object
-
.bundle_args(_config) ⇒ Object
No behavioral config on the Rust side (candidates only); unused by the rails segment, kept for parity with the sibling wrappers.
- .cop_name ⇒ Object
Methods included from IndexMethodSupport
included, #investigate_block, #investigate_csend, #investigate_send, #on_new_investigation
Class Method Details
.badge ⇒ Object
22 |
# File 'lib/shirobai/cop/rails/index_by.rb', line 22 def self.badge = RuboCop::Cop::Badge.parse(cop_name) |
.bundle_args(_config) ⇒ Object
No behavioral config on the Rust side (candidates only); unused by the rails segment, kept for parity with the sibling wrappers.
26 27 28 |
# File 'lib/shirobai/cop/rails/index_by.rb', line 26 def self.bundle_args(_config) [] end |
.cop_name ⇒ Object
21 |
# File 'lib/shirobai/cop/rails/index_by.rb', line 21 def self.cop_name = "Rails/IndexBy" |