Commit 165834b3 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'complexity/rubocop-style-loop' into 'master'

Enable Style/InfiniteLoop Rubocop cop

This MR enabled Style/InfiniteLoop Rubocop cop, and fixes offenses.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/17478

See merge request !4257
parents 42aca7df 17eaecd6
......@@ -299,7 +299,7 @@ Style/IndentHash:
# Use Kernel#loop for infinite loops.
Style/InfiniteLoop:
Enabled: false
Enabled: true
# Use the new lambda literal syntax for single-line blocks.
Style/Lambda:
......
......@@ -253,7 +253,7 @@ module Network
leaves = []
leaves.push(commit) if commit.space.zero?
while true
loop do
return leaves if commit.parents(@map).count.zero?
commit = commit.parents(@map).first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment