We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The cop should pass
An error occurred while Lint/SafeNavigationConsistency cop was inspecting <file> undefined method `type' for nil:NilClass vendor/bundle/gems/rubocop-0.55.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb:72:in `top_conditional_ancestor' vendor/bundle/gems/rubocop-0.55.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb:75:in `top_conditional_ancestor' vendor/bundle/gems/rubocop-0.55.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb:40:in `check' vendor/bundle/gems/rubocop-0.55.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb:36:in `on_csend'
Failing spec, which is a bit contrived, but illustrates the same failure that I get in my project's code with a more complex line: swrobel@12ba988
$ rubocop -V 0.55.0 (using Parser 2.5.1.0, running on ruby 2.5.1 x86_64-darwin17)
cc @rrosenblum
The text was updated successfully, but these errors were encountered:
[Fix rubocop#5791] Fix NoMethodError in SafeNavigationConsistency whe…
837bedc
…n there is code around the condition
[Fix #5791] Fix NoMethodError in SafeNavigationConsistency when there…
df7d019
… is code around the condition
Successfully merging a pull request may close this issue.
Expected behavior
The cop should pass
Actual behavior
Steps to reproduce the problem
Failing spec, which is a bit contrived, but illustrates the same failure that I get in my project's code with a more complex line: swrobel@12ba988
RuboCop version
cc @rrosenblum
The text was updated successfully, but these errors were encountered: