Class: Shirobai::Cop::RSpec::DuplicatedMetadata
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- Shirobai::Cop::RSpec::DuplicatedMetadata
- Extended by:
- RuboCop::Cop::AutoCorrector
- Includes:
- RuboCop::Cop::RangeHelp, RuboCop::RSpec::Language, MetadataSupport
- Defined in:
- lib/shirobai/cop/rspec/duplicated_metadata.rb
Overview
Drop-in Rust reimplementation of RSpec/DuplicatedMetadata
(rubocop-rspec 3.10.2).
Rust supplies the shared metadata-anchor block ranges; this wrapper
relocates each parser block node and runs stock's on_metadata plus
autocorrect VERBATIM, so structural eql? duplicate detection and the
comma/space-aware removal match byte for byte.
Constant Summary collapse
- MSG =
"Avoid duplicated metadata."
Class Method Summary collapse
- .badge ⇒ Object
-
.bundle_args(_config) ⇒ Object
Config-less; the shared anchor list needs no per-cop settings.
- .cop_name ⇒ Object
Instance Method Summary collapse
- #metadata_slot ⇒ Object
-
#on_metadata(symbols, _hash) ⇒ Object
--- stock's private methods, copied verbatim (rubocop-rspec 3.10.2) ---.
Methods included from MetadataSupport
#metadata_in_block, #on_new_investigation, #rspec_configure, #rspec_metadata
Class Method Details
.badge ⇒ Object
23 |
# File 'lib/shirobai/cop/rspec/duplicated_metadata.rb', line 23 def self.badge = RuboCop::Cop::Badge.parse(cop_name) |
.bundle_args(_config) ⇒ Object
Config-less; the shared anchor list needs no per-cop settings.
26 27 28 |
# File 'lib/shirobai/cop/rspec/duplicated_metadata.rb', line 26 def self.bundle_args(_config) [] end |
.cop_name ⇒ Object
22 |
# File 'lib/shirobai/cop/rspec/duplicated_metadata.rb', line 22 def self.cop_name = "RSpec/DuplicatedMetadata" |
Instance Method Details
#metadata_slot ⇒ Object
30 |
# File 'lib/shirobai/cop/rspec/duplicated_metadata.rb', line 30 def = :rspec_duplicated_metadata |
#on_metadata(symbols, _hash) ⇒ Object
--- stock's private methods, copied verbatim (rubocop-rspec 3.10.2) ---
34 35 36 37 38 |
# File 'lib/shirobai/cop/rspec/duplicated_metadata.rb', line 34 def (symbols, _hash) symbols.each do |symbol| (symbol) end end |