Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a1cad13b
Commit
a1cad13b
authored
Aug 27, 2018
by
Jacopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes rubocop chain ordinary method after safe navigation operator
parent
c6bddeac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
rubocop/cop/prefer_class_methods_over_module.rb
rubocop/cop/prefer_class_methods_over_module.rb
+5
-2
No files found.
rubocop/cop/prefer_class_methods_over_module.rb
View file @
a1cad13b
...
@@ -48,12 +48,15 @@ module RuboCop
...
@@ -48,12 +48,15 @@ module RuboCop
private
private
def
extends_activesupport_concern?
(
node
)
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
)
extend_activesupport_concern?
(
descendant
)
end
end
end
end
def
container_module
(
node
)
def
container_module
_of
(
node
)
node
=
node
.
parent
until
node
.
type
==
:module
node
=
node
.
parent
until
node
.
type
==
:module
node
node
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment