lib/oink/instrumentation/active_record.rb

Summary

Maintainability
A
1 hr
Test Coverage

Assignment Branch Condition size for included is too high. [30.1/20]
Open

      def self.included(klass)
        klass.class_eval do

          def self.reset_instance_type_count
            self.instantiated_hash = {}

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Method included has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def self.included(klass)
        klass.class_eval do

          def self.reset_instance_type_count
            self.instantiated_hash = {}
Severity: Minor
Found in lib/oink/instrumentation/active_record.rb - About 1 hr to fix

    Variable value used in void context.
    Open

                  value

    This cop checks for operators, variables and literals used in void context.

    Example:

    # bad
    
    def some_method
      some_num * 10
      do_something
    end

    Example:

    # bad
    
    def some_method(some_var)
      some_var
      do_something
    end

    Example:

    # good
    
    def some_method
      do_something
      some_num * 10
    end

    Example:

    # good
    
    def some_method(some_var)
      do_something
      some_var
    end

    There are no issues that match your filters.

    Category
    Status