renehernandez/data_structures_101

View on GitHub

Showing 99 of 99 total issues

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Trailing whitespace detected.
Open

  
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

    context '.new' do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Trailing whitespace detected.
Open

        context 'pop' do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

Trailing whitespace detected.
Open

        let (:fixed_heap) do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

            args = 10.times.map { Random.rand(10) }
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Trailing whitespace detected.
Open

            it 'sets the new value in the right location after siftup' do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

Trailing whitespace detected.
Open

            it 'sets the new value in the right location after siftup' do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

Trailing whitespace detected.
Open

    
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Extra empty line detected at class body end.
Open


  end
Severity: Minor
Found in lib/data_structures_101/heap.rb by rubocop

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Trailing whitespace detected.
Open

    
Severity: Minor
Found in lib/data_structures_101/heap.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

                fixed_heap.push(13)
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Trailing whitespace detected.
Open

    context 'merge' do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

Use a guard clause instead of wrapping the code inside a conditional expression.
Open

      if head != i
Severity: Minor
Found in lib/data_structures_101/heap.rb by rubocop

Use a guard clause instead of wrapping the code inside a conditional expression

Example:

# bad
def test
  if something
    work
  end
end

# good
def test
  return unless something
  work
end

# also good
def test
  work if something
end

# bad
if something
  raise 'exception'
else
  ok
end

# good
raise 'exception' if something
ok

Trailing whitespace detected.
Open

  
Severity: Minor
Found in spec/bucket_spec.rb by rubocop

Use 2 (not 4) spaces for indentation.
Open

        let(:max_heap) do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 4) spaces for indentation.
Open

        let(:heap) do 
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 4) spaces for indentation.
Open

            1.upto(9) do |i|
Severity: Minor
Found in spec/heap_spec.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end
Severity
Category
Status
Source
Language