helium/helium-ruby

View on GitHub
lib/helium/collection.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class Collection has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Collection
    include Enumerable

    attr_reader :filter_criteria

Severity: Minor
Found in lib/helium/collection.rb - About 2 hrs to fix

    TODO found
    Open

        # TODO: could support something like label.sensors << new_sensor
    Severity: Minor
    Found in lib/helium/collection.rb by fixme

    Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
    Open

            if existing_value = @filter_criteria[key]
    Severity: Minor
    Found in lib/helium/collection.rb by rubocop

    This cop checks for assignments in the conditions of if/while/until.

    Example:

    # bad
    
    if some_var = true
      do_something
    end

    Example:

    # good
    
    if some_var == true
      do_something
    end

    There are no issues that match your filters.

    Category
    Status