You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Expected behavior
Describe here how you expected RuboCop to behave in this particular situation.
I expect that rubocop correct all offenses without any errors
Actual behavior
rubocop_example@Admins-MacBook-Pro ~ % rubocop example_spec.rb --only Style/SingleArgumentDig -A
Inspecting 1 file
An error occurred while Style/SingleArgumentDig cop was inspecting /Users/anton.i/example_spec.rb:1:0.
To see the complete backtrace run rubocop -d.
C
Offenses:
example_spec.rb:1:1: C: [Corrected] Style/SingleArgumentDig: Use example_evidence.dig('supporting_messages')[0]['name'] instead of example_evidence.dig('supporting_messages')[0].dig('name').
example_evidence.dig('supporting_messages')[0].dig('name')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
example_spec.rb:1:1: C: [Corrected] Style/SingleArgumentDig: Use example_evidence['supporting_messages'] instead of example_evidence.dig('supporting_messages').
example_evidence.dig('supporting_messages')[0]['name']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 2 offenses detected, 2 offenses corrected
1 error occurred:
An error occurred while Style/SingleArgumentDig cop was inspecting /Users/anton.i/example_spec.rb:1:0.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues
Mention the following information in the issue report:
1.26.1 (using Parser 3.1.1.0, rubocop-ast 1.16.0, running on ruby 2.7.3 x86_64-darwin17)
Describe here what actually happened.
Please use rubocop --debug when pasting rubocop output as it contains additional information.
execute in terminal echo 'example_evidence.dig('supporting_messages')[0].dig('name')' >> example.rb
execute in terminal rubocop example.rb --only Style/SingleArgumentDig -A
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler.
If you see extension cop versions (e.g. rubocop-performance, rubocop-rspec, and others)
output by rubocop -V, include them as well. Here's an example:
Fixesrubocop#10510.
This PR fixes an error for `Style/SingleArgumentDig`
when using multiple `dig` in a method chain.
And this is the same solution as rubocop#10461.
Fixes#10510.
This PR fixes an error for `Style/SingleArgumentDig`
when using multiple `dig` in a method chain.
And this is the same solution as #10461.
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Expected behavior
Describe here how you expected RuboCop to behave in this particular situation.
I expect that rubocop correct all offenses without any errors
Actual behavior
Describe here what actually happened.
Please use
rubocop --debug
when pasting rubocop output as it contains additional information.Steps to reproduce the problem
echo 'example_evidence.dig('supporting_messages')[0].dig('name')' >> example.rb
rubocop example.rb --only Style/SingleArgumentDig -A
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:The text was updated successfully, but these errors were encountered: