Skip to content
Snippets Groups Projects
Commit a1cad13b authored by Jacopo's avatar Jacopo
Browse files

Fixes rubocop chain ordinary method after safe navigation operator

parent c6bddeac
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -48,12 +48,15 @@ module RuboCop
private
 
def extends_activesupport_concern?(node)
container_module(node.parent)&.descendants.any? do |descendant|
container_module = container_module_of(node.parent)
return false unless container_module
container_module.descendants.any? do |descendant|
extend_activesupport_concern?(descendant)
end
end
 
def container_module(node)
def container_module_of(node)
node = node.parent until node.type == :module
 
node
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment